c++/7400: segfault with -shared option

Wolfgang Bangerth bangerth@ticam.utexas.edu
Wed Oct 30 15:40:00 GMT 2002


> >     ------------------------------
> >     int main () {};
> >     ------------------------------
> >
> >     Here's what I get:
> >     tmp/g> c++ -shared x.cc
> >     tmp/g> ./a.out
> >     Speicherzugriffsfehler
> 
> Huh?  With -shared you create a shared library.  You can't run a shared
> lib.  So getting a SEGV isn't wrong.

Very fair criticism. I was just confused that I could execute the library, 
and that I could also open it in gdb like a program.

Thanks for lifting the bar from in front of my head :-) I'll close the 
report in a second.

Regards
  Wolfgang

-------------------------------------------------------------------------
Wolfgang Bangerth              email:           bangerth@ticam.utexas.edu
                               www: http://www.ticam.utexas.edu/~bangerth




More information about the Gcc-bugs mailing list