This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
GCC 3.2 runs with glibc-2.2, crashes with glibc-2.3?
- From: yuvalk at mainsoft dot com
- To: gcc at gcc dot gnu dot org
- Date: Sun, 29 Feb 2004 09:17:58 +0200
- Subject: GCC 3.2 runs with glibc-2.2, crashes with glibc-2.3?
Hello,
I'm not sure whether this belongs on this list or on the glibc mailing list,
please correct me if I'm wrong.
We are using gcc-3.2 on Red Hat Linux 7.3 (which has glibc-2.2). We have built
from a clean GNU distribution, not an RPM. We've had no problems building and
running until we tried running on RHL systems with glibc-2.3 (such as RHL 8 and
RHL 9). On those systems, we get a crash dlclose()ing a C++ library with
iostreams.
That is, we have a C++ shared lib which does nothing except #include <iostream>,
and a C loader which calls dlopen() and dlclose() on a given shared library.
The steps we take are:
* Build our gcc-3.2 compiler on RHL 7.3 (with glibc-2.2).
(Of course this was done only once).
* Build the shared lib and loader on RHL 7.3 with the gcc-3.2 compiler.
* Run on RHL 7.3 (with glibc-2.2) - all's well.
* Run on RHL 8.0 or 9.0 with glibc-2.3 - crashes at dlclose(). The stack is as
follows, more or less:
#0 0x4004cfd1 in kill () from /lib/libc.so.6
#1 0x4004cc94 in raise () from /lib/libc.so.6
#2 0x4004e04d in abort () from /lib/libc.so.6
#3 0x4012bc40 in __deregister_frame_info_bases_internal () from /lib/libc.so.6
#4 0x4001388a in ?? ()
#5 0x40013a07 in ?? ()
#6 0x4012b231 in _dl_close () from /lib/libc.so.6
#7 0x40023f69 in dlclose_doit () from /lib/libdl.so.2
#8 0x4000a053 in _dl_catch_error_internal () from /lib/ld-linux.so.2
#9 0x40024252 in _dlerror_run () from /lib/libdl.so.2
#10 0x40023f3f in dlclose () from /lib/libdl.so.2
#11 0x08048784 in main (argc=2, argv=0xbfffd2d4) at loader.c:14
#12 0x4003b4ed in __libc_start_main () from /lib/libc.so.6
What could be the source of the problem? This does not happen if I use Red Hat's
flavour of GCC 3.2 (that comes with RHL 8.0 for example). Is the problem with
the compiler, glibc, or C++ run-time library?
What we want is to be able to build with gcc-3.2 in a glibc-2.2 environment, and
run in glibc-2.2 and glibc-2.3 environments.
Thanks in advance for any help, hints, tips...
- Yuval
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.