DragonFly users List (threaded) for 2008-07
DragonFly BSD
DragonFly users List (threaded) for 2008-07
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Hammer on snapshot cd's


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Tue, 15 Jul 2008 19:34:10 +0100

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




[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]