DragonFly users List (threaded) for 2008-07
Re: Hammer on snapshot cd's
Matthew Dillon wrote:
:> That is very odd. Maybe there's a 64-bit arithmatic problem somewhere
:> w/ gcc-34.
:the following patch fixes the problem for me. Not sure whether it is the
:correct solution though.
:+ 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.