gcc bug with -ggdb?

Have a question about our Software Developer Kit? Ask them here.
Post Reply
User avatar
Raziel
Posts: 963
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

gcc bug with -ggdb?

Post 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
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg

Trev
Posts: 5
Joined: Sat Jun 18, 2011 5:48 pm

Re: gcc bug with -ggdb?

Post 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.

User avatar
Raziel
Posts: 963
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: gcc bug with -ggdb?

Post 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 :-)
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg

User avatar
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: gcc bug with -ggdb?

Post 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.
ExecSG Team Lead

User avatar
Raziel
Posts: 963
Joined: Sat Jun 18, 2011 4:00 pm
Location: a dying planet

Re: gcc bug with -ggdb?

Post 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
People are dying.
Entire ecosystems are collapsing.
We are in the beginning of a mass extinction.
And all you can talk about is money and fairytales of eternal economic growth.
How dare you!
– Greta Thunberg

Post Reply