2010-03-16 10:26:20     Problem with C++ exceptions

Document created by Aaronwu Employee on Sep 26, 2013
Version 1Show Document
  • View in full screen mode

2010-03-16 10:26:20     Problem with C++ exceptions

Kolja Waschk (GERMANY)

Message: 87263   

 

Hi,

 

I experience problems trying to run FDPIC C++ code on a BF537 with 2009R1.1-RC4 uClinux-dist, compiled with bfin-linux-uclibc-g++ of the 2009R1.1-RC2 toolchain. The problems also showed up with earlier versions (2009R1) of dist and toolchain.

 

The following simple program leads to a "Data access CPLB miss" (always when started via gdbserver, sometimes when started standalone, often when started standalone on the older dist):

 

int main()

{

  try { throw "foo"; }

  catch (...) { }

}

 

According to the GDB and HW trace output (sometimes, when this information gets through to the console) it fails in

 

/usr/src/packages/BUILD/blackfin-toolchain-09r1.1/../gcc-4.1/gcc/unwind-dw2-fde.c:273

 

Before I install and try to build the toolchain from source for further experiments, I'd like to ask if there's anyone here who has experienced similar problems, any idea towards a solution, etc...???

 

Thanks in advance,

Kolja

QuoteReplyEditDelete

 

 

2010-03-16 14:15:53     Re: Problem with C++ exceptions

Kolja Waschk (GERMANY)

Message: 87279   

 

Maybe similar to old toolchain/tracker/id=2518 .. unfortunately, the solution isn't described there. Anybody here who remembers it?

QuoteReplyEditDelete

 

 

2010-03-16 15:01:04     Re: Problem with C++ exceptions

Kolja Waschk (GERMANY)

Message: 87287   

 

Command line to compile the above source to reproduce the  problem:

 

bfin-linux-uclibc-g++ -static -o test_bfin_ex test_bfin_ex.cc

 

Without "-static", the problem seems to disappear in this special case

QuoteReplyEditDelete

 

 

2010-03-16 16:22:54     Re: Problem with C++ exceptions

Mike Frysinger (UNITED STATES)

Message: 87291   

 

click the "commit" tab in the tracker to see the changes that went into gcc to fix the issue

QuoteReplyEditDelete

 

 

2010-03-17 05:18:44     Re: Problem with C++ exceptions

Kolja Waschk (GERMANY)

Message: 87321   

 

Ah, thanks for the usage hint. However, it doesn't seem to be actually related on first sight, so I took the liberty and created a new tracker item toolchain/tracker/id=5974

QuoteReplyEditDelete

 

 

2010-04-08 04:42:16     Re: Problem with C++ exceptions

Kolja Waschk (GERMANY)

Message: 88228   

 

After a while it turns out to happen also with dynamically linked binaries, not just -static. It never happened yet with the dynamically bound simple example (as described in the tracker) though. While I now understand that exceptions generally lead to SIGABRT in gdb, they should never cause a CPLB fault. I still haven't found the actual cause for the problem.

QuoteReplyEditDelete

Attachments

    Outcomes