This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/7400: segfault with -shared option
- From: bangerth at dealii dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, t6 at pobox dot com
- Date: 30 Oct 2002 23:03:03 -0000
- Subject: Re: c++/7400: segfault with -shared option
- Reply-to: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, t6 at pobox dot com, gcc-gnats at gcc dot gnu dot org
Old Synopsis: dynamic_cast segfaults with -shared option
New Synopsis: segfault with -shared option
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Wed Oct 30 15:03:03 2002
State-Changed-Why:
I see the same behavior, although it has nothing to do with
dynamic_cast as suggested in the previous name of the
report: this also happens with this code:
------------------------------
int main () {};
------------------------------
Here's what I get:
tmp/g> c++ x.cc
tmp/g> ./a.out
tmp/g>
tmp/g> c++ -shared x.cc
tmp/g> ./a.out
Speicherzugriffsfehler
(which means "Segmentation Fault", I just have not found
out how to change the stupid german defaults on my system.)
I guess I must be making something very naive, but then
I don't see it, and this happens with 2.95, 3.2 and present
CVS... :-(
(And no, I don't have any idea why I can compile all my
program with this option and why it runs. Also, the
problem does not go away if I use -fPIC, or if I link
separately. The crash happens before we get into "main",
by the way, and we don't get a meaningful backtrace. Please
someone enlighten me...)
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=7400