c++/7400: segfault with -shared option

bangerth@dealii.org bangerth@dealii.org
Wed Oct 30 15:15:00 GMT 2002


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



More information about the Gcc-bugs mailing list