On Thu, Jan 23, 2014 at 12:12:23PM -0800, Jonathan Nieder wrote:

> Jeff King wrote:
> > On Thu, Jan 23, 2014 at 11:52:06AM -0800, Jonathan Nieder wrote:
> >> 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
> [...]
> > 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

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to