| May | JUN | Jul |
| 16 | ||
| 2012 | 2013 | 2014 |
COLLECTED BY
Collection: Wide Crawl started April 2013
Compiler Bug
case '2':
which = choose_recipe();
/* temporary needed to workaround compiler bug */
edit_recipe(which);
break;
edit_recipe(choose_recipe()) triggered the bug - IIRC it passed an incorrect value to edit_recipe. This was in compiler for embedded 68K systems made by Crossware.
Another bug in the same compiler, happened when the last line of a source file had no trailing newline, and the compiler was set to generate assembly: it would mangle the assembler output.
To be fair to Crossware, they fixed these two bugs very promptly.
Also in Analog Devices Visual DSP++, there was a HeisenBug in the linker that depended on the order of object modules in the linker definition file. Never did work out exactly what the bug was, but it went away with the next version.
I've also seen 3 or 4 bugs in Sun's javac compiler.
Long ago I found and reported a very severe bug in Sun's C compiler optimizer (it optimized a local variable initialization out of existence). It took them 2 years to fix it.
k = k;
Henceforth, strange problems were met with the comment, "k=k".
x=1
y=1
would get compiled into assembly language that boiled down to:
x=1
x=1
Unfortunately, the computer vendor had been sued by, and had countersued DG. So the chances the vendor would get DG to fix the bug were nil. We ended having to write a bunch of trig algorithms to verify the results of O/S calls.
-- Barry Fox
using( Type x = CreateXSomehow() )
switch( y )
{ ... }
the compiler would crash (though this is valid C# syntax). Replacing it with
using( Type x = CreateXSomehow() )
{
switch( y )
{ ... }
}
(added curly braces around the switch statement) would make it work as expected.
{ foo x;
if (i == 2)
return x;
} //XXX
}
At XXX, when execution reaches the end of this block, the for-body, the destructor of x should be automatically called. With this bug in the optimizer related to "named return value optimization", it skips the destructor call of x at XXX. This is the most heinous compiler bug I have ever seen. UPDATE: Apparently because of the thread in the newsgroup and some insider reading it, they've finally decided to fix it for VS 2010 in the next service pack. +1 karma points for Microsoft. ...and, for taking so long to fix the problem, -1 karma points for Microsoft.
EditText of this page
(last edited March 18, 2010)
or FindPage with title or text search