c++/7400: segfault with -shared option

Michael Matz matz@suse.de
Wed Oct 30 15:32:00 GMT 2002


Hi,

On 30 Oct 2002 bangerth@dealii.org wrote:

>     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.)

Huh?  With -shared you create a shared library.  You can't run a shared
lib.  So getting a SEGV isn't wrong.


Ciao,
Michael.



More information about the Gcc-bugs mailing list