Thread (67 messages) flat view 67 messages, 8 authors, 2016-06-15

Re: [PATCH v4 08/23] ewah: compressed bitmap implementation

From: Jeff King <hidden>
Date: 2016-06-15 22:59:44

On Thu, Jan 23, 2014 at 12:12:23PM -0800, Jonathan Nieder wrote:
Jeff King wrote:
quoted
On Thu, Jan 23, 2014 at 11:52:06AM -0800, Jonathan Nieder wrote:
quoted
quoted
My main worry about the patches is that they will probably run into
an analagous problem to the one that v1.7.12-rc0~1^2~2
[...]
quoted
I think this probably works in practice because align_ntohl is inlined,
and any sane compiler will never actually load the variable.
I don't think that's safe to rely on.  The example named above didn't
pose any problems except on one platform.  All the relevant functions
were static and easy to inline.  GCC just followed the standard
literally and chose to break by reading one word at a time, just like
in this case it could break e.g. by copying one word at a time in
__builtin_memcpy (which seems perfectly reasonable to me ---
optimization involves a lot of constraint solving, and if you can't
trust your constraints then there's not much you can do).
I wasn't disagreeing with you. I was guessing at why it did not fail out
of the box when I tested it.  What do you think of the alternative I
posted?

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help