Jump to content
Fabien

-D_GLIBCXX_DEBUG makes systemc-2.3.0 crash

Recommended Posts

Hi,

 

Sorry for posting that here as I guess this is not the usual bug report tool, and also sorry if this is a duplicate. I have tried to look for this issue on the forum, but could not find.

 

Environment:

I am using systemc proof of concept downloaded from accelera, version 2.3.0. The bug appears on cygwin/g++5.3.0 and also on linux centOS/g++4.7.3.

 

Issue :

When compiling with flag -D_GLIBCXX_DEBUG, the program will crash with a core dump when systemc is not compiled in debug mode. When compiled in debug mode, the program will crash with an error message "Error: (E513) an sc_module_name parameter for your constructor is required". When the program is compiled WITHOUT the -D_GLIBCXX_DEBUG flag, everything goes fine.

 

Testcase :

This can be seen with the example coming with the proof of concept. I tested it on on simple_fifo.

 

Note :

- I also tried to compile the systemc sources with the option -D_GLIBCXX_DEBUG, but it led to a segmentation fault when running the example.

- I did not check the issue against v2.3.1, but could not find the release notes (and thus I don't know if it's a known issue).

 

Can someone tell me if this is a real bug ?

 

Share this post


Link to post
Share on other sites

The release notes are inside the SystemC 2.3.1 distribution, in the text file RELEASENOTES.

 

Is the following post relevant?

 

http://stackoverflow.com/questions/12629255/detecting-abi-compatibility-issues-with-gcc

 

regards

Alan

 

Hi Alan,

 

Ok, sorry for the release notes, I did not look in the most obvious place... I have read the bug fixes part of 2.3.1 and could not find anything relevant. For the SO post, I would say this is not related : I have also tried to compile the systemc library with the GLIBCXX_DEBUG flag, and then compiling the whole program. It gave a segmentation fault (that is a different behavior than when the lib is compiled normally).

Share this post


Link to post
Share on other sites

I did a quick local check and can reproduce the issue on SystemC 2.3.0 (Debian GNU/Linux, X86_64, GCC 5.3.1).

However, on SystemC 2.3.1,

../configure CXXFLAGS='-D_GLIBCXX_DEBUG'
make -j4 check

completes successfully.

 

Can you try on SystemC 2.3.1 again?

 

Please note, that not all changes are explicitly listed in the RELEASENOTES and the release includes quite some cleanups and might have accidentally "fixed" the bug along the way.

 

Thanks for your report,

  Philipp

Share this post


Link to post
Share on other sites

I did a quick local check and can reproduce the issue on SystemC 2.3.0 (Debian GNU/Linux, X86_64, GCC 5.3.1).

However, on SystemC 2.3.1,

../configure CXXFLAGS='-D_GLIBCXX_DEBUG'
make -j4 check

completes successfully.

 

Can you try on SystemC 2.3.1 again?

 

Please note, that not all changes are explicitly listed in the RELEASENOTES and the release includes quite some cleanups and might have accidentally "fixed" the bug along the way.

 

Thanks for your report,

  Philipp

 

Ok, would be good if this can be fixed, I'm afraid I need the debug flag when coding c++ :) I will check that as soon as I can. Thanks for your help !

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×