egcs-1.0.3a bug with function-static class variable in .so lib

Erik Toubro Nielsen erik@ifad.dk
Fri Jun 19 10:39:00 GMT 1998


Linux 2.0.33, egcs-1.0.3a, binutils-2.9.1, ld.so-1.9.9. 

c++ - bug: calling a function (with a static class variable) in a .so
library will cause the loading program to seg-fault when main()
returns.  The class must have a destructor.

In comparison, gcc-2.7.2 does not cause this behaviour. 

The error also occurs on Solaris 2.6 and SunOS 4.1.3 with egcs-1.0.3a.

The files can be found in http://www.ifad.dk/~erik/egcs-dl-bug.tar

In the Makefile modify CXX to point to your g++, execute make and then
run ./main

--
Erik
erik@ifad.dk



More information about the Gcc-bugs mailing list