[ale] tech "magic"
Pete Hardie
pete.hardie at gmail.com
Wed May 27 10:20:26 EDT 2009
On Wed, May 27, 2009 at 09:52, Michael H. Warfield <mhw at wittsend.com> wrote:
> On Wed, 2009-05-27 at 09:18 -0400, Geoffrey wrote:
>> Rev. Johnny Healey wrote:
>> > There's a great wikipedia article on unusual software bugs:
>> >
>> > http://en.wikipedia.org/wiki/Unusual_software_bug
>> >
>> > I actually ran into a schroedinbug in an apache config file today.
>>
>> I actually identified a bug in an old c compiler on SVR3 years ago that
>> would be defined as a heisenbug. A piece of code was dropping core at a
>> particular point. I put in a printf and a comment above it, recompiled
>> and it ran fine. Remove the printf and comment, drops core. We finally
>> figured out that we could remove the printf and leave the comment in the
>> code and the code would run. Remove the comment and it would drop core.
>> We eventually simply placed a comment that said something like:
>
>> /* don't remove this comment, the code will drop core with out it */
>
> Sounds like an optimizer problem. Use to run into those all quite
> often at high optimizer settings. Sometimes entire loops would get
> optimized into non-existence and volatile variables were a laugh,
> especially in system/kernel code. I forget what compiler it was but I
> remember reading the documentation and the optimizer when from 0 (no
> optimization) through several levels that included in-line optimization
> and unrolling loops and speed vs size. The highest level of
> optimization was described in the documentation as "Dearly beloved we
> are gathered here...".
I've run into 2 really weird ones
One was a file that was dated several months earlier than the bug
appearance date, had been compiled into executable many times in the
interim, but when we looked at it in the editor, we saw code that was
syntactically incorrect - and the very next compile failed at that
point. We never found out how it was working.
The other one was from my first job - the compiler (Cadmus UNIX)
barfed if you had more than 138 defined constants (not 128, or 256,
but 138). I think we hypothesized it was the size of the constants
that exceeded some boundary, but we just moved some to global
variables initialized at the start and left it.
--
Pete Hardie
--------
Better Living Through Bitmaps
More information about the Ale
mailing list