Page 1 of 1

gcc bug with -ggdb?

Posted: Fri Sep 16, 2011 1:33 pm
by Raziel
gcc (GCC) 4.2.4 (adtools build 20090118)

I have a *very* strange behaviour with one of my ports.
The default setting when building a non-release is to have "-g" set in configure.

With this setting the project crashes at the same point reproduceable but without giving any useful debug info
(it keeps telling me that libstdc++.so crashed, but it doubt that and the program addresses differ randomly)
like so...
Hidden Text - Click to Show :
Symbol info:
Instruction pointer 0x7EAB8714 belongs to module "libstdc++.so" (PowerPC)
Symbol: ZNK10__cxxabiv120__si_class_type_info12__do_dyncastEiNS_17__class_type_info10__sub_kindEPKS1_PKvS4_S6_RNS1_16__dyncast_resultE + 0x78 in section 10 offset 0x00076714

Stack trace:
libstdc++.so:_ZNK10__cxxabiv120__si_class_type_info12__do_dyncastEiNS_17__class_type_info10__sub_kindEPKS1_PKvS4_S6_RNS1_16__dyncast_resultE()+0x78 (section 10 @ 0x76714)
libstdc++.so:__dynamic_cast()+0x84 (section 10 @ 0x771b4)
So i went on looking and eventually tried to get more info through gdb with adding -ggdb and -gstabs to configure and what you say it worked...no more crash at that specific point, the program worked and also doesn't crash later in the process.

I tried more and now have a little list of circumstances that make it crash and work.

-g (crash)
-ggdb (crash)
-gstabs (NO crash)
-ggdb -gstabs (NO crash)
no debug flags at all (NO crash)

Does that give anyone a hint on where i could look next, or is this a bug already taken care of (i know there is an unrealeased 4.4.4 of gcc ) or has anyone another idea on what i could try to corner that?

Please?

Thank you very much for your time

Re: gcc bug with -ggdb?

Posted: Sat Sep 17, 2011 8:42 pm
by Trev
This looks similar to the issue reported in these threads:

http://forum.hyperion-entertainment.biz ... ?f=27&t=71
http://amigans.net/index.php?function=v ... readid=147

But I can't tell without more information. I've never heard from anyone regarding a fix.

Re: gcc bug with -ggdb?

Posted: Sun Sep 18, 2011 9:00 am
by Raziel
Trev wrote:This looks similar to the issue reported in these threads:

http://forum.hyperion-entertainment.biz ... ?f=27&t=71
http://amigans.net/index.php?function=v ... readid=147

But I can't tell without more information. I've never heard from anyone regarding a fix.
Seems like it could be :-)

Thanks for pointing me to those threads

Heres hoping there'll be a fix someday :-)

Re: gcc bug with -ggdb?

Posted: Mon Sep 19, 2011 5:52 am
by ssolie
You should stick to using -gstabs all the time anyway.

I realize it is a tad annoying but not really worth fixing until we upgrade the compiler to the latest GCC version.

Re: gcc bug with -ggdb?

Posted: Sat Sep 24, 2011 9:33 pm
by Raziel
@ssolie

Nope, that a sensible hint and a very easy workaround and it makes it even more sensible receiving this workaround from a dev :-)

I'll stick with -gstabs and hope you have already cornered the problem

Here's hoping for gcc4.4.4 :-)

Thanks a lot