This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]