Hammer on snapshot cd's
Simon 'corecode' Schubert
corecode at fs.ei.tum.de
Tue Jul 15 11:39:15 PDT 2008
Matthew Dillon wrote:
:..
:> :
:>
:> That is very odd. Maybe there's a 64-bit arithmatic problem somewhere
:> w/ gcc-34.
:
:Hi Matt,
:
:the following patch fixes the problem for me. Not sure whether it is the
:correct solution though.
:
:Cheers,
:Johannes
:
:Index: hammer_btree.c
:+ int error = 0;
: int r;
Wow. That is one nasty bug and I am very happy that you found it.
I will fix it right now.
I blame my own convalescence. I was relying on gcc-4 to warn me about
possible uninitialized variable use and got a bit too fancy in my
handling of 'error' in that routine. GCC missed a case where I was not
initializing error in a switch deeper down in that routine.
How the heck can a compiler "miss" this? I thought whenever there
existed a possible execution path which would not initialize the
variable, it would complain.
cheers
simon
More information about the Users
mailing list