On Sat, Mar 13, 2010 at 11:07:13AM +0100, Iustin Pop wrote: > On Fri, Mar 12, 2010 at 11:33:41PM +0100, sean finney wrote: > > i'm not saying it *isn't* a compiler error, but inserting a few printfs and > > the problem disappearing is also pretty common in other situations of > > "undefined behavior"... > > I disagree here. Undefined behaviour related to integer arithmetic > should only corrupt the values in question, and a printf can't magically > make them correct again. So yes, it might be a compiler bug, but I still > don't think it's related to 64-bit arithmetic, but rather something else > (storage of 64-bits values in registers/memory? optimization of such > values? etc.). > > I'll run a compile with trapv, but a few small tests with the > ZigZagEncode64/ZigZagDecode64 a -ftrapv shows there is no overflow. Expect > results in a few hours…
So, I can't even get the unittests compiled, since protoc aborts in this case. Which means that yes, upstream relies on the semantics of wraparound... iustin -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org