Mail Archives: djgpp/2001/06/21/07:51:56
On Thu, 21 Jun 2001 07:46:24 GMT, invalid AT erehwon DOT invalid (Graaagh the
Mighty) sat on a tribble, which squeaked:
>Call frame traceback EIPs:
> 0x01fc0000 0x1fc0000
> 0x0000178b _main+275, line 195 of bwlsm.c
> 0x00057b7a ___crt1_startup+174
>gcc bwlsm.c -o bwlsm.exe -lalleg -g -Wall -Werror
>i.e. only default optimizations, nothing whatsoever aggressive.
>The weirdest thing is that the program worked fine until I added some
>debugging printfs to bar, whereupon it started dying before it could
>even *reach* bar...
I have more information. On a hunch I looked at the changes. There was
a bug in one of the debugging bits I added that would in fact have
jumped into never-never land -- *if* "bar" had ever been reached. So
why weren't the call frame traceback EIPs more like:
0x01fc0000 0x1fc0000
0x00f00ba7 _bar+42, line 666 of bwlsm.c
0x0000178b _main+275, line 195 of bwlsm.c
0x00057b7a ___crt1_startup+174
even with no aggressive optimizations? There's no way it was inlining
bar -- not with less than -O3, not with bar as big as it is (~200
loc), and not with bar called via a function pointer!
--
Bill Gates: "No computer will ever need more than 640K of RAM." -- 1980
"There's nobody getting rich writing software that I know of." -- 1980
"This antitrust thing will blow over." -- 1998
Combine neo, an underscore, and one thousand sixty-one to make my hotmail addy.
- Raw text -