public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Christoph Bugel <chris@tti-telecom.com>
To: bkoz@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: libstdc++/5166: Segfault when using global std::string from dlopen
Date: Mon, 08 Apr 2002 14:56:00 -0000	[thread overview]
Message-ID: <20020408215602.20585.qmail@sources.redhat.com> (raw)

The following reply was made to PR libstdc++/5166; it has been noted by GNATS.

From: Christoph Bugel <chris@tti-telecom.com>
To: bkoz@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
	nobody@gcc.gnu.org, gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: libstdc++/5166: Segfault when using global std::string from dlopen
Date: Tue, 9 Apr 2002 00:47:17 +0300

 On Fri 2002-04-05, bkoz@gcc.gnu.org wrote:
 [...]
 >     See libstdc++/6062. I'd appreciate it if you'd try this with the gcc-3.1 toolchain. 
 [...]
 >     I think this is either a gcc-on-HPUX specific problem, or a problem with the HPUX dynamic linker. Thoughts on how to proceed?
 
 I think you're right, it does work just fine on Linux and on Solaris.
 But on HP-UX it still crashes on me; I just tried with the latest gcc 3.1.
 (Test is identical to the one attached to this PR, except that I removed the
 unneeded -lpthread from Makefile)
 I'll be happy to provide more details, etc. Or if someone can tell me what
 obvious mistake (FAQ?) I made, please do :-)
 BTW, to be sure, I tested a similar scenario with pure C code, and that doesn't
 crash. Also, if someone with access to an HP machine could confirm this, it
 would be helpful.
 
 Thanks
 
 Below are shell commands with the details:
 
 
 $ make
 g++ -fPIC -Wall -g -c mydll.cc -o mydll.o
 g++ -fPIC -shared -o libmydll.sl mydll.o -fPIC -g
 g++ -fPIC -Wall -g -c main.cc -o main.o
 g++ -o main main.o -fPIC -g -ldld
 
 
 $ ./main 
 hello
 Segmentation fault (core dumped)
 
 
 $ gcc -v
 Reading specs from /users/chris/big/install-test31/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.1/specs
 Configured with: /users/chris/big/gcc-20020401/configure --prefix=/users/chris/big/install-test31 --with-gnu-as --with-as=/test/gnu/bin/as --enable-languages=c++
 Thread model: single
 gcc version 3.1 20020401 (prerelease)
 
 
 $ gdb main core
 HP gdb 2.1
 Copyright 1986 - 1999 Free Software Foundation, Inc.
 Hewlett-Packard Wildebeest 2.1 (based on GDB 5.0-hpwdb-20000630)
 Wildebeest is free software, covered by the GNU General Public License, and
 you are welcome to change it and/or distribute copies of it under certain
 conditions.  Type "show copying" to see the conditions.  There is
 absolutely no warranty for Wildebeest.  Type "show warranty" for details.
 Wildebeest was built for PA-RISC 1.1 or 2.0 (narrow), HP-UX 11.00.
 .
 Core was generated by `main'.
 Program terminated with signal 11, Segmentation fault.
 
 warning: The shared libraries were not privately mapped; setting a
 breakpoint in a shared library will not work until you rerun the program.
 
 #0  _ZNSsaSEPKc (this=<incomplete type>, __s=0x7f7ae0f4 "")
     at /users/chris/big/build-31/hppa2.0w-hp-hpux11.00/libstdc++-v3/include/bits/basic_string.h:153
 153     /users/chris/big/build-31/hppa2.0w-hp-hpux11.00/libstdc++-v3/include/bits/basic_string.h: No such file or directory.
 (gdb) where
 #0  _ZNSsaSEPKc (this=<incomplete type>, __s=0x7f7ae0f4 "")
     at /users/chris/big/build-31/hppa2.0w-hp-hpux11.00/libstdc++-v3/include/bits/basic_string.h:153
 #1  0xc04a2bc8 in func () at mydll.cc:10
 #2  0x2d70 in main () at main.cc:20
 
 
 $ gcc -rdynamic
 gcc: unrecognized option `-rdynamic'
 gcc: no input files
 


             reply	other threads:[~2002-04-08 21:56 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-08 14:56 Christoph Bugel [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-04-05 11:57 bkoz
2002-04-05 11:14 bkoz
2001-12-20  8:36 Christoph Bugel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020408215602.20585.qmail@sources.redhat.com \
    --to=chris@tti-telecom.com \
    --cc=bkoz@gcc.gnu.org \
    --cc=gcc-prs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).