public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/9597: Exception crash in shared library on Solaris 2.8 Intel platform
@ 2003-02-06 17:06 Pascal Vantrepote
0 siblings, 0 replies; 4+ messages in thread
From: Pascal Vantrepote @ 2003-02-06 17:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1667 bytes --]
The following reply was made to PR c++/9597; it has been noted by GNATS.
From: Pascal Vantrepote <pvantrepote@yahoo.fr>
To: Christian Ehrhardt <ehrhardt@mathematik.uni-ulm.de>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/9597: Exception crash in shared library on Solaris 2.8
Intel platform
Date: 06 Feb 2003 17:58:42 +0100
Still crashing.
This is the elfdump:
Global Offset Table: 3 entries
ndx addr value reloc addend symbol
[00000] 00001b30 00001a70 R_386_NONE 00000000
[00001] 00001b34 00000000 R_386_NONE 00000000
[00002] 00001b38 00000000 R_386_NONE 00000000
Thanks for all.
Pascal.
On Thu, 2003-02-06 at 17:16, Christian Ehrhardt wrote:
> On Thu, Feb 06, 2003 at 02:36:54PM -0000, pvantrepote@yahoo.fr wrote:
> > I got a crash when i throw an exception in a shared library.
> > I use gcc 3.2.1 on Solaris 2.8 i386 Intel Platform.
> > [ ... ]
>
> Core dumps with shared libs and Solaris rings a bell. However, what I
> have in mind shouldn't apply to intel targets at all. Could you try the
> following experiments and tell me if any of these help:
>
> - Use the SUN supplied linker to create the shared library
> - Add -z nocombreloc to the ld flags for the GNU linker
> - link the shared lib statically into the program.
>
> If any of these make a difference send the output of elfdump -G
> for the shared lib.
>
> regards Christian
--
Pascal Vantrepote <pvantrepote@yahoo.fr>
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/9597: Exception crash in shared library on Solaris 2.8 Intel platform
@ 2003-02-19 8:06 Pascal Vantrepote
0 siblings, 0 replies; 4+ messages in thread
From: Pascal Vantrepote @ 2003-02-19 8:06 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 850 bytes --]
The following reply was made to PR c++/9597; it has been noted by GNATS.
From: "Pascal Vantrepote" <pvantrepote@yahoo.fr>
To: "'Christian Ehrhardt'" <ehrhardt@mathematik.uni-ulm.de>
Cc: <gcc-gnats@gcc.gnu.org>
Subject: Re: c++/9597: Exception crash in shared library on Solaris 2.8 Intel platform
Date: Wed, 19 Feb 2003 08:59:05 +0100
Hi,
We have another problem.
If we have 2 different library with 2 functions (same name, different
code, different parameters).
On Linux, its working but on Solaris, the system calls always the same
function (instead of the parameters).
I think it's a pb with the gnu linker, or something like that.
Best Regards
Pascal.
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: c++/9597: Exception crash in shared library on Solaris 2.8 Intel platform
@ 2003-02-06 16:26 Christian Ehrhardt
0 siblings, 0 replies; 4+ messages in thread
From: Christian Ehrhardt @ 2003-02-06 16:26 UTC (permalink / raw)
To: nobody; +Cc: gcc-prs
The following reply was made to PR c++/9597; it has been noted by GNATS.
From: "Christian Ehrhardt" <ehrhardt@mathematik.uni-ulm.de>
To: pvantrepote@yahoo.fr
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: c++/9597: Exception crash in shared library on Solaris 2.8 Intel platform
Date: Thu, 6 Feb 2003 17:16:57 +0100
On Thu, Feb 06, 2003 at 02:36:54PM -0000, pvantrepote@yahoo.fr wrote:
> I got a crash when i throw an exception in a shared library.
> I use gcc 3.2.1 on Solaris 2.8 i386 Intel Platform.
> [ ... ]
Core dumps with shared libs and Solaris rings a bell. However, what I
have in mind shouldn't apply to intel targets at all. Could you try the
following experiments and tell me if any of these help:
- Use the SUN supplied linker to create the shared library
- Add -z nocombreloc to the ld flags for the GNU linker
- link the shared lib statically into the program.
If any of these make a difference send the output of elfdump -G
for the shared lib.
regards Christian
--
THAT'S ALL FOLKS!
^ permalink raw reply [flat|nested] 4+ messages in thread
* c++/9597: Exception crash in shared library on Solaris 2.8 Intel platform
@ 2003-02-06 14:46 pvantrepote
0 siblings, 0 replies; 4+ messages in thread
From: pvantrepote @ 2003-02-06 14:46 UTC (permalink / raw)
To: gcc-gnats
>Number: 9597
>Category: c++
>Synopsis: Exception crash in shared library on Solaris 2.8 Intel platform
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Feb 06 14:46:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: gcc
>Release: 3.2.1
>Organization:
>Environment:
Solaris 2.8 Intel
>Description:
Hi,
I got a crash when i throw an exception in a shared library.
I use gcc 3.2.1 on Solaris 2.8 i386 Intel Platform.
gcc -v:
Reading specs from /usr/lib/gcc-lib/i386-pc-solaris2.8/3.2.1/specs
Configured with: ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --with-gnu-ld --with-ld=/usr/bin/ld --with-gnu-nm --with-nm=/usr/bin/nm --with-gnu-as --with-as=/usr/bin/as
Thread model: posix
gcc version 3.2.1
Shared Library Source code:
////// Lib
#include <stdio.h>
#include <iostream>
extern "C" bool test(void)
{
return true;
}
extern "C" void _init(void)
{
std::cout << "_init" << std::endl;
try
{
int toto=15;
throw(toto);
}
catch (int& truc)
{
std::cout << truc << std::endl;
}
}
Compil result:
g++ -v -fexceptions -Wno-deprecated -O0 -g3 -I/sources/Opalis/DVT4/ToolKit/ -L/sources/Opalis/DVT4/lib/ -DINTEL -DSOLARIS -DUNIX -D_GNU_SOURCE -DOS_MULTI_THREADED -DOS_SOLARIS_2_7 -DOS_SOLARIS_PTHREADS -DOS_PTHREADS -DOS_REALTIME -D_REENTRANT -DOS_NO_WSTRING -DOS_USE_STD_IOSTREAMS -c -o main_lib.o main_lib.cpp
Reading specs from /usr/lib/gcc-lib/i386-pc-solaris2.8/3.2.1/specs
Configured with: ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --with-gnu-ld --with-ld=/usr/bin/ld --with-gnu-nm --with-nm=/usr/bin/nm --with-gnu-as --with-as=/usr/bin/as
Thread model: posix
gcc version 3.2.1
/usr/lib/gcc-lib/i386-pc-solaris2.8/3.2.1/cc1plus -v -I/sources/Opalis/DVT4/ToolKit/ -D__GNUC__=3 -D__GNUC_MINOR__=2
-D__GNUC_PATCHLEVEL__=1 -D__GXX_ABI_VERSION=102 -Dunix -D__svr4__ -D__SVR4 -Dsun -D__PRAGMA_REDEFINE_EXTNAME -D__unix__ -D__svr4__ -D__SVR4 -D__sun__ -D__PRAGMA_REDEFINE_EXTNAME -D__unix -D__sun -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HOSTED__=1 -dD -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D__EXTENSIONS__ -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i386__ -DINTEL -DSOLARIS -DUNIX -D_GNU_SOURCE -DOS_MULTI_THREADED -DOS_SOLARIS_2_7 -DOS_SOLARIS_PTHREADS -DOS_PTHREADS -DOS_REALTIME -D_REENTRANT -DOS_NO_WSTRING -DOS_USE_STD_IOSTREAMS main_lib.cpp -D__GNUG__=3 -D__EXCEPTIONS -quiet -dumpbase main_lib.cpp -g3 -O0 -Wno-deprecated -version -fexceptions -o /var/tmp//ccSTajtv.s
GNU CPP version 3.2.1 (cpplib) (i386 System V Release 4)
GNU C++ version 3.2.1 (i386-pc-solaris2.8)
compiled by GNU C version 3.2.1.
ignoring nonexistent directory "/usr/i386-pc-solaris2.8/include"
#include "..." search starts here:
#include <...> search starts here:
/sources/Opalis/DVT4/ToolKit
/usr/include/c++/3.2.1
/usr/include/c++/3.2.1/i386-pc-solaris2.8
/usr/include/c++/3.2.1/backward
/usr/local/include
/usr/lib/gcc-lib/i386-pc-solaris2.8/3.2.1/include
/usr/include
End of search list.
/usr/bin/as --traditional-format -V -Qy -o main_lib.o /var/tmp//ccSTajtv.s
GNU assembler version 2.13.2 (i386-pc-solaris2.8) using BFD version 2.13.2 20021220
g++ -I/sources/Opalis/DVT4/ToolKit/ -L/sources/Opalis/DVT4/lib/ -nostartfiles -g -shared -W1,-soname,lib.dl -o lib.dl main_lib.o -lc
Exec source code:
//////
#include <dlfcn.h>
#include <iostream>
#include <link.h>
typedef bool (* test_fnc)(void);
bool test(void);
int main(int argv, char* argc)
{
void* dl_handle = dlopen("./lib.dl", RTLD_NOW);
if (!dl_handle)
{
std::cout << "Error:" << dlerror() << std::endl;
return 1;
}
//
test_fnc test = (test_fnc) dlsym(dl_handle, "test");
(*test)();
dlclose(dl_handle);
return (0);
}
Compil Result:
g++ -v -fexceptions -Wno-deprecated -O0 -g3 -I/sources/Opalis/DVT4/ToolKit/ -L/sources/Opalis/DVT4/lib/ -DINTEL -DS
OLARIS -DUNIX -D_GNU_SOURCE -DOS_MULTI_THREADED -DOS_SOLARIS_2_7 -DOS_SOLARIS_PTHREADS -DOS_PTHREADS -DOS_REALTIME -D_
REENTRANT -DOS_NO_WSTRING -DOS_USE_STD_IOSTREAMS -c -o main_exe.o main_exe.cpp
Reading specs from /usr/lib/gcc-lib/i386-pc-solaris2.8/3.2.1/specs
Configured with: ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=
posix --with-gnu-ld --with-ld=/usr/bin/ld --with-gnu-nm --with-nm=/usr/bin/nm --with-gnu-as --with-as=/usr/bin/as
Thread model: posix
gcc version 3.2.1
/usr/lib/gcc-lib/i386-pc-solaris2.8/3.2.1/cc1plus -v -I/sources/Opalis/DVT4/ToolKit/ -D__GNUC__=3 -D__GNUC_MINOR__=2
-D__GNUC_PATCHLEVEL__=1 -D__GXX_ABI_VERSION=102 -Dunix -D__svr4__ -D__SVR4 -Dsun -D__PRAGMA_REDEFINE_EXTNAME -D__unix_
_ -D__svr4__ -D__SVR4 -D__sun__ -D__PRAGMA_REDEFINE_EXTNAME -D__unix -D__sun -Asystem=svr4 -D__NO_INLINE__ -D__STDC_HO
STED__=1 -dD -D_XOPEN_SOURCE=500 -D_LARGEFILE_SOURCE=1 -D_LARGEFILE64_SOURCE=1 -D__EXTENSIONS__ -Acpu=i386 -Amachine=i
386 -Di386 -D__i386 -D__i386__ -D__tune_i386__ -DINTEL -DSOLARIS -DUNIX -D_GNU_SOURCE -DOS_MULTI_THREADED -DOS_SOLARIS
_2_7 -DOS_SOLARIS_PTHREADS -DOS_PTHREADS -DOS_REALTIME -D_REENTRANT -DOS_NO_WSTRING -DOS_USE_STD_IOSTREAMS main_exe.cp
p -D__GNUG__=3 -D__EXCEPTIONS -quiet -dumpbase main_exe.cpp -g3 -O0 -Wno-deprecated -version -fexceptions -o /var/tmp/
/ccn0iCnL.s
GNU CPP version 3.2.1 (cpplib) (i386 System V Release 4)
GNU C++ version 3.2.1 (i386-pc-solaris2.8)
compiled by GNU C version 3.2.1.
ignoring nonexistent directory "/usr/i386-pc-solaris2.8/include"
#include "..." search starts here:
#include <...> search starts here:
/sources/Opalis/DVT4/ToolKit
/usr/include/c++/3.2.1
/usr/include/c++/3.2.1/i386-pc-solaris2.8
/usr/include/c++/3.2.1/backward
/usr/local/include
/usr/lib/gcc-lib/i386-pc-solaris2.8/3.2.1/include
/usr/include
End of search list.
/usr/bin/as --traditional-format -V -Qy -o main_exe.o /var/tmp//ccn0iCnL.s
GNU assembler version 2.13.2 (i386-pc-solaris2.8) using BFD version 2.13.2 20021220
g++ -v -fexceptions -Wno-deprecated -O0 -g3 -I/sources/Opalis/DVT4/ToolKit/ -L/sources/Opalis/DVT4/lib/ -DINTEL -DS
OLARIS -DUNIX -D_GNU_SOURCE -DOS_MULTI_THREADED -DOS_SOLARIS_2_7 -DOS_SOLARIS_PTHREADS -DOS_PTHREADS -DOS_REALTIME -D_
REENTRANT -DOS_NO_WSTRING -DOS_USE_STD_IOSTREAMS main_exe.o -o exe
Reading specs from /usr/lib/gcc-lib/i386-pc-solaris2.8/3.2.1/specs
Configured with: ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-
threads=posix -enable-languages=c,c++ --with-gnu-as --with-as=/usr/bin/as --with-gnu-ld --with-ld=/usr/bin/ld : (recon
figured) ./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=
posix --with-gnu-ld --with-ld=/usr/bin/ld --with-gnu-nm --with-nm=/usr/bin/nm --with-gnu-as --with-as=/usr/bin/as
Thread model: posix
gcc version 3.2.1
/usr/lib/gcc-lib/i386-pc-solaris2.8/3.2.1/collect2 -V -Y P,/usr/ccs/lib:/usr/lib -Qy -o exe /usr/lib/gcc-lib/i386-pc-
solaris2.8/3.2.1/crt1.o /usr/lib/gcc-lib/i386-pc-solaris2.8/3.2.1/crti.o /usr/ccs/lib/values-Xa.o /usr/lib/gcc-lib/i38
6-pc-solaris2.8/3.2.1/crtbegin.o -L/sources/Opalis/DVT4/lib/ -L/usr/lib/gcc-lib/i386-pc-solaris2.8/3.2.1 -L/usr/ccs/bi
n -L/usr/ccs/lib -L/usr/lib/gcc-lib/i386-pc-solaris2.8/3.2.1/../../.. main_exe.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_
s -lgcc /usr/lib/gcc-lib/i386-pc-solaris2.8/3.2.1/crtend.o /usr/lib/gcc-lib/i386-pc-solaris2.8/3.2.1/crtn.o
GNU ld version 2.13.2 20021220
Supported emulations:
elf_i386_ldso
elf_i386
Please help me.
Thranks.
Pascal.
>How-To-Repeat:
Just compile the library and the executable. And run it.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-02-19 8:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-06 17:06 c++/9597: Exception crash in shared library on Solaris 2.8 Intel platform Pascal Vantrepote
-- strict thread matches above, loose matches on Subject: below --
2003-02-19 8:06 Pascal Vantrepote
2003-02-06 16:26 Christian Ehrhardt
2003-02-06 14:46 pvantrepote
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).