This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
egcs-1.0.3a bug with function-static class variable in .so lib
- To: egcs-bugs at cygnus dot com
- Subject: egcs-1.0.3a bug with function-static class variable in .so lib
- From: Erik Toubro Nielsen <erik at ifad dot dk>
- Date: Fri, 19 Jun 1998 19:30:50 +0200 (MET DST)
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