You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2006/06/06 21:28:29 UTC

[jira] Created: (STDCXX-199) [XLC++ 8.0/Linux/PPC] SIGSEGV throwing an exception

[XLC++ 8.0/Linux/PPC] SIGSEGV throwing an exception
---------------------------------------------------

         Key: STDCXX-199
         URL: http://issues.apache.org/jira/browse/STDCXX-199
     Project: C++ Standard Library
        Type: Bug

  Components: External  
    Versions: 4.1.3    
 Environment: XLC++ 8.0, gcc 3.3.3, SuSE Linux on PowerPC:

$ uname -srvp && /lib64/tls/libc.so.6
Linux 2.6.5-7.191-pseries64 #1 SMP Tue Jun 28 14:58:56 UTC
2005 ppc64
GNU C Library stable release version 2.3.3 (20040412), by
Roland McGrath et al.
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or
FITNESS FOR A
PARTICULAR PURPOSE.
Configured for ppc64-suse-linux.
Compiled by GNU CC version 3.3.3 (SuSE Linux).
Compiled on a Linux 2.6.5 system on 2005-06-03.
Available extensions:
        GNU libio by Per Bothner
        crypt add-on version 2.1 by Michael Glad and others
        NPTL 0.61 by Ulrich Drepper
        GNU Libidn by Simon Josefsson
        BIND-8.2.3-T5B
        NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
Thread-local storage support included.
Report bugs using the `glibcbug' script to <bu...@gnu.org>.
    Reporter: Martin Sebor


PMR 02264,K78,000

When compiled and linked with XLC++ 8.0 using the specified command line options the program below exits abnormally. The same program runs successfully to
completion when compiled and linked with gcc on the same machine (using gcc -g -m64 t.cpp -lsupc++).

$ cat t.cpp && xlc -qversion && xlc t.cpp -q64 -g -lxlopt -lxl -libmc++ -lsupc++ -lgcc -lgcc_eh && ./a.out 
struct A { };

void foo ();
void bar () throw (A) { return foo (); }

int foobar ()
{
    try {
        bar ();
        return 1;
    }
    catch (A) { return 0; }
    catch (...) { }
    return 2;
}

int main ()
{
    return foobar ();
}

void foo ()
{
    struct B: A { };

    B b;

    throw b;
}
IBM XL C/C++ Advanced Edition V8.0 for Linux   
Version: 08.00.0000.0000  
Segmentation fault

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (STDCXX-199) [XLC++ 8.0/Linux/PPC] SIGSEGV throwing an exception

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/STDCXX-199?page=comments#action_12415020 ] 

Martin Sebor commented on STDCXX-199:
-------------------------------------

This is causing failures in many tests -- see
http://mail-archives.apache.org/mod_mbox/incubator-stdcxx-dev/200606.mbox/%3cD730FF7CEDDCA64483F9E99D999A158B119C13@qxvcexch01.ad.quovadx.com%3e

> [XLC++ 8.0/Linux/PPC] SIGSEGV throwing an exception
> ---------------------------------------------------
>
>          Key: STDCXX-199
>          URL: http://issues.apache.org/jira/browse/STDCXX-199
>      Project: C++ Standard Library
>         Type: Bug

>   Components: External
>     Versions: 4.1.3
>  Environment: XLC++ 8.0, gcc 3.3.3, SuSE Linux on PowerPC:
> $ uname -srvp && /lib64/tls/libc.so.6
> Linux 2.6.5-7.191-pseries64 #1 SMP Tue Jun 28 14:58:56 UTC
> 2005 ppc64
> GNU C Library stable release version 2.3.3 (20040412), by
> Roland McGrath et al.
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or
> FITNESS FOR A
> PARTICULAR PURPOSE.
> Configured for ppc64-suse-linux.
> Compiled by GNU CC version 3.3.3 (SuSE Linux).
> Compiled on a Linux 2.6.5 system on 2005-06-03.
> Available extensions:
>         GNU libio by Per Bothner
>         crypt add-on version 2.1 by Michael Glad and others
>         NPTL 0.61 by Ulrich Drepper
>         GNU Libidn by Simon Josefsson
>         BIND-8.2.3-T5B
>         NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
> Thread-local storage support included.
> Report bugs using the `glibcbug' script to <bu...@gnu.org>.
>     Reporter: Martin Sebor

>
> PMR 02264,K78,000
> When compiled and linked with XLC++ 8.0 using the specified command line options the program below exits abnormally. The same program runs successfully to
> completion when compiled and linked with gcc on the same machine (using gcc -g -m64 t.cpp -lsupc++).
> $ cat t.cpp && xlc -qversion && xlc t.cpp -q64 -g -lxlopt -lxl -libmc++ -lsupc++ -lgcc -lgcc_eh && ./a.out 
> struct A { };
> void foo ();
> void bar () throw (A) { return foo (); }
> int foobar ()
> {
>     try {
>         bar ();
>         return 1;
>     }
>     catch (A) { return 0; }
>     catch (...) { }
>     return 2;
> }
> int main ()
> {
>     return foobar ();
> }
> void foo ()
> {
>     struct B: A { };
>     B b;
>     throw b;
> }
> IBM XL C/C++ Advanced Edition V8.0 for Linux   
> Version: 08.00.0000.0000  
> Segmentation fault

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (STDCXX-199) [XLC++ 8.0/Linux/PPC] SIGSEGV throwing an exception

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/STDCXX-199?page=comments#action_12416216 ] 

Martin Sebor commented on STDCXX-199:
-------------------------------------

-------- Original Message --------
Subject: Re: PMR #: 02264,K78,000-abnormal exit of code on execution
Date: Wed, 14 Jun 2006 09:34:55 -0600
From: Martin Sebor <se...@roguewave.com>
Organization: Rogue Wave Software
To: Basil Kanneth <bk...@ca.ibm.com>
CC: Zoran Kulina <zo...@ca.ibm.com>
References: <OF...@ca.ibm.com>

Basil Kanneth wrote:
> Hi Martin,
> 
> Our investigation determined this is not a compiler issue.
> 
> The problem is you used a C compiler (xlc) to compile and link a C++ 
> program. The C compiler will not link in the necessary C++ components such 
> as C++ libraries.
> 
> When using the '-q64' option with xlc, the default '-lgcc_eh' library gets 
> invoked at link time instead of the desired '-lgcc_s_64' library. Hence 
> the 'segmentation fault' at execution time. 

Aha!

> 
> The best solution is to use xlc++ when compiling C++ programs since we 
> support linking C++ objects with xlc++.

We cannot use the xlC driver when using our implementation
of the C++ Standard Library since it links with libstdc++,
the GNU implementation of the same. The link line we are
using now was provided to us by IBM in lieu of a more
convenient interface (such as xlCcore on AIX that we would
have vastly preferred). We wish IBM would reconsider the
request and help us and out mutual customers avoid these
types of problems in the future. Please see PMR 02151 for
more.

Thanks
Martin

> [XLC++ 8.0/Linux/PPC] SIGSEGV throwing an exception
> ---------------------------------------------------
>
>          Key: STDCXX-199
>          URL: http://issues.apache.org/jira/browse/STDCXX-199
>      Project: C++ Standard Library
>         Type: Bug

>   Components: External
>     Versions: 4.1.3
>  Environment: XLC++ 8.0, gcc 3.3.3, SuSE Linux on PowerPC:
> $ uname -srvp && /lib64/tls/libc.so.6
> Linux 2.6.5-7.191-pseries64 #1 SMP Tue Jun 28 14:58:56 UTC
> 2005 ppc64
> GNU C Library stable release version 2.3.3 (20040412), by
> Roland McGrath et al.
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or
> FITNESS FOR A
> PARTICULAR PURPOSE.
> Configured for ppc64-suse-linux.
> Compiled by GNU CC version 3.3.3 (SuSE Linux).
> Compiled on a Linux 2.6.5 system on 2005-06-03.
> Available extensions:
>         GNU libio by Per Bothner
>         crypt add-on version 2.1 by Michael Glad and others
>         NPTL 0.61 by Ulrich Drepper
>         GNU Libidn by Simon Josefsson
>         BIND-8.2.3-T5B
>         NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
> Thread-local storage support included.
> Report bugs using the `glibcbug' script to <bu...@gnu.org>.
>     Reporter: Martin Sebor

>
> PMR 02264,K78,000
> When compiled and linked with XLC++ 8.0 using the specified command line options the program below exits abnormally. The same program runs successfully to
> completion when compiled and linked with gcc on the same machine (using gcc -g -m64 t.cpp -lsupc++).
> $ cat t.cpp && xlc -qversion && xlc t.cpp -q64 -g -lxlopt -lxl -libmc++ -lsupc++ -lgcc -lgcc_eh && ./a.out 
> struct A { };
> void foo ();
> void bar () throw (A) { return foo (); }
> int foobar ()
> {
>     try {
>         bar ();
>         return 1;
>     }
>     catch (A) { return 0; }
>     catch (...) { }
>     return 2;
> }
> int main ()
> {
>     return foobar ();
> }
> void foo ()
> {
>     struct B: A { };
>     B b;
>     throw b;
> }
> IBM XL C/C++ Advanced Edition V8.0 for Linux   
> Version: 08.00.0000.0000  
> Segmentation fault

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (STDCXX-199) [XLC++ 8.0/Linux/PPC] SIGSEGV throwing an exception

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/STDCXX-199?page=comments#action_12416215 ] 

Martin Sebor commented on STDCXX-199:
-------------------------------------

-------- Original Message --------
Subject: Re: PMR #: 02264,K78,000-abnormal exit of code on execution
Date: Wed, 14 Jun 2006 11:24:13 -0400
From: Basil Kanneth <bk...@ca.ibm.com>
To: sebor@roguewave.com
CC: Zoran Kulina <zo...@ca.ibm.com>

Hi Martin,

Our investigation determined this is not a compiler issue.

The problem is you used a C compiler (xlc) to compile and link a C++ 
program. The C compiler will not link in the necessary C++ components such 
as C++ libraries.

When using the '-q64' option with xlc, the default '-lgcc_eh' library gets 
invoked at link time instead of the desired '-lgcc_s_64' library. Hence 
the 'segmentation fault' at execution time. 

The best solution is to use xlc++ when compiling C++ programs since we 
support linking C++ objects with xlc++.

Please contact me if you have any questions regarding this issue.

Sincerely,

Basil Kanneth
XL C/C++ and Fortran Support
IBM Software Group - Toronto Lab
+1 905-413-2880



Basil Kanneth/Toronto/IBM
06/08/2006 05:17 PM

To: sebor@roguewave.com
cc:
Subject: Re: PMR #: 02264,K78,000-abnormal exit of code on execution

Hi Martin, 

I would like to inform you that a defect has been opened for this PMR for 
XL C/C++ Advanced Edition V8.0 for Linux. 

>From my investigation, it appears to be the '-q64' option that causes the 
abnormal exit of code on execution.

I am further investigating on why the '-q64' option causes the problem. I 
will provide you with an update by Wednesday, June 14th, 2006.

Please feel free to contact me if you have any questions. 

Sincerely,

Basil Kanneth
XL C/C++ and Fortran Support
IBM Software Group - Toronto Lab
+1 905-413-2880



Basil Kanneth/Toronto/IBM 
06/06/2006 04:25 PM

To
sebor@roguewave.com
cc

Subject
PMR #: 02264,K78,000-abnormal exit of code on execution






Hi Martin, 

I am Basil Kanneth and I have taken ownership of this PMR.

I was able to reproduce the problem with the test case that you provided. 

I am investigating the issue. I will let you know of any updates by 
Friday, June 9th. 

Please feel free to contact me if you have any questions. 

Sincerely,

Basil Kanneth
XL C/C++ and Fortran Support
IBM Software Group - Toronto Lab
+1 905-413-2880

> [XLC++ 8.0/Linux/PPC] SIGSEGV throwing an exception
> ---------------------------------------------------
>
>          Key: STDCXX-199
>          URL: http://issues.apache.org/jira/browse/STDCXX-199
>      Project: C++ Standard Library
>         Type: Bug

>   Components: External
>     Versions: 4.1.3
>  Environment: XLC++ 8.0, gcc 3.3.3, SuSE Linux on PowerPC:
> $ uname -srvp && /lib64/tls/libc.so.6
> Linux 2.6.5-7.191-pseries64 #1 SMP Tue Jun 28 14:58:56 UTC
> 2005 ppc64
> GNU C Library stable release version 2.3.3 (20040412), by
> Roland McGrath et al.
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or
> FITNESS FOR A
> PARTICULAR PURPOSE.
> Configured for ppc64-suse-linux.
> Compiled by GNU CC version 3.3.3 (SuSE Linux).
> Compiled on a Linux 2.6.5 system on 2005-06-03.
> Available extensions:
>         GNU libio by Per Bothner
>         crypt add-on version 2.1 by Michael Glad and others
>         NPTL 0.61 by Ulrich Drepper
>         GNU Libidn by Simon Josefsson
>         BIND-8.2.3-T5B
>         NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
> Thread-local storage support included.
> Report bugs using the `glibcbug' script to <bu...@gnu.org>.
>     Reporter: Martin Sebor

>
> PMR 02264,K78,000
> When compiled and linked with XLC++ 8.0 using the specified command line options the program below exits abnormally. The same program runs successfully to
> completion when compiled and linked with gcc on the same machine (using gcc -g -m64 t.cpp -lsupc++).
> $ cat t.cpp && xlc -qversion && xlc t.cpp -q64 -g -lxlopt -lxl -libmc++ -lsupc++ -lgcc -lgcc_eh && ./a.out 
> struct A { };
> void foo ();
> void bar () throw (A) { return foo (); }
> int foobar ()
> {
>     try {
>         bar ();
>         return 1;
>     }
>     catch (A) { return 0; }
>     catch (...) { }
>     return 2;
> }
> int main ()
> {
>     return foobar ();
> }
> void foo ()
> {
>     struct B: A { };
>     B b;
>     throw b;
> }
> IBM XL C/C++ Advanced Edition V8.0 for Linux   
> Version: 08.00.0000.0000  
> Segmentation fault

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (STDCXX-199) [XLC++ 8.0/Linux/PPC] SIGSEGV throwing an exception

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/STDCXX-199?page=comments#action_12420439 ] 

Martin Sebor commented on STDCXX-199:
-------------------------------------

See the gcc bug I just filed for this in case there's some interesting info http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28351.

> [XLC++ 8.0/Linux/PPC] SIGSEGV throwing an exception
> ---------------------------------------------------
>
>          Key: STDCXX-199
>          URL: http://issues.apache.org/jira/browse/STDCXX-199
>      Project: C++ Standard Library
>         Type: Bug

>   Components: External
>     Versions: 4.1.3
>  Environment: XLC++ 8.0, gcc 3.3.3, SuSE Linux on PowerPC:
> $ uname -srvp && /lib64/tls/libc.so.6
> Linux 2.6.5-7.191-pseries64 #1 SMP Tue Jun 28 14:58:56 UTC
> 2005 ppc64
> GNU C Library stable release version 2.3.3 (20040412), by
> Roland McGrath et al.
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or
> FITNESS FOR A
> PARTICULAR PURPOSE.
> Configured for ppc64-suse-linux.
> Compiled by GNU CC version 3.3.3 (SuSE Linux).
> Compiled on a Linux 2.6.5 system on 2005-06-03.
> Available extensions:
>         GNU libio by Per Bothner
>         crypt add-on version 2.1 by Michael Glad and others
>         NPTL 0.61 by Ulrich Drepper
>         GNU Libidn by Simon Josefsson
>         BIND-8.2.3-T5B
>         NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
> Thread-local storage support included.
> Report bugs using the `glibcbug' script to <bu...@gnu.org>.
>     Reporter: Martin Sebor

>
> PMR 02264,K78,000
> When compiled and linked with XLC++ 8.0 using the specified command line options the program below exits abnormally. The same program runs successfully to
> completion when compiled and linked with gcc on the same machine (using gcc -g -m64 t.cpp -lsupc++).
> $ cat t.cpp && xlc -qversion && xlc t.cpp -q64 -g -lxlopt -lxl -libmc++ -lsupc++ -lgcc -lgcc_eh && ./a.out 
> struct A { };
> void foo ();
> void bar () throw (A) { return foo (); }
> int foobar ()
> {
>     try {
>         bar ();
>         return 1;
>     }
>     catch (A) { return 0; }
>     catch (...) { }
>     return 2;
> }
> int main ()
> {
>     return foobar ();
> }
> void foo ()
> {
>     struct B: A { };
>     B b;
>     throw b;
> }
> IBM XL C/C++ Advanced Edition V8.0 for Linux   
> Version: 08.00.0000.0000  
> Segmentation fault

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (STDCXX-199) [XLC++ 8.0/Linux/PPC] SIGSEGV throwing an exception

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/STDCXX-199?page=comments#action_12419307 ] 

Martin Sebor commented on STDCXX-199:
-------------------------------------

-------- Original Message --------
Subject: Re: PMR #: 02264,K78,000-abnormal exit of code on execution
Date: Tue, 4 Jul 2006 15:33:47 -0400
From: Basil Kanneth <bk...@ca.ibm.com>
To: Martin Sebor <se...@roguewave.com>

Hi Martin,

Has the '-qnostaticlink=libgcc' option fixed the abnormal exit of code on 
execution ?

Sincerely,

Basil Kanneth
XL C/C++ and Fortran Support
IBM Software Group - Toronto Lab
+1 905-413-2880



Basil Kanneth/Toronto/IBM
06/26/2006 03:19 PM

To
Martin Sebor <se...@roguewave.com>
cc

Subject
Re: PMR #: 02264,K78,000-abnormal exit of code on execution





Hi Martin,

We have observed the following problem with GNU GCC's library. Consider 
the following test case.

#include <assert.h>
struct A { };

void foo ();

void bar () {
    try {
            return foo();
    } catch ( A ) {
            throw;
    } catch ( ... ) {
            assert( 0 );
    }
}

int foobar () {
    try {
            bar ();
            return 1;
        }
    catch ( A ) { return 0; }
    catch ( ... ) { }
    return 2;
}

int main () {

    return foobar ();
}

void foo () {
    struct B: A { };

    B b;
    throw b;
}

When compiling with:

g++ -m64 a.C -c
gcc -m64 c.o -lsupc++

The program will give a memory fault.  This shows that the problem is in 
GCC's static EH library.

Using the -v option to expand the command line output:
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/collect2 --eh-frame-hdr -V -Qy 
-m elf64ppc -dynamic-linker /lib64/ld64.so.1 
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../lib64/crt1.o 
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../lib64/crti.o 
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/64/crtbegin.o 
-L/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/64 
-L/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3 
-L/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../powerpc-suse-linux/lib 
-L/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../lib64 
-L/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../.. -L/lib/../lib64 
-L/usr/lib/../lib64 c.o -lsupc++ -lgcc -lgcc_eh -lc -lgcc -lgcc_eh 
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/64/crtsavres.o 
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/64/crtend.o 
/usr/lib/gcc-lib/powerpc-suse-linux/3.3.3/../../../../lib64/crtn.o

Notice (in the above command line output) that the static '-lgcc_eh' 
library is being linked by gcc even though only when -lsupc++ was listed. 
However, the following command line (as shown below)  will resolve the 
problem.

xlc t.cpp -q64 -g -lxlopt -lxl -libmc++ -lsupc++ -lgcc 
-qnostaticlink=libgcc

The reason why '-qnostaticlink=libgcc' is used is because it links the 
shared gcc_s_64 library instead of the static gcc_eh library. Here is 
what's happening:

When the g++ runtime implements __cxa_throw (or __cxa_rethrow in this 
case), it needs to restore the non-volatile registers, SP and R2 (Table Of 
Contents) to the proper values. It pulls the information for the registers 
and SP from the .eh_frame information.  For R2, it pulls it from the 
location where the TOC is saved, that is at 40(SP),  for a call that 
changes the TOC. Therefore, if the g++ runtime is not shared, the compiler 
has never saved R2 in that location, and a random value is pulled off the 
stack and put into R2.  This results in abnormal behavior the next time 
the TOC is referenced. Hence, the solution is to link it to the shared 
gcc_s_64 library.

Keep in mind, you need to link to libgcc_s.so in 32bit and libgcc_s_64.so 
in 64bit.

Also, your request for the equivalent of xlCcore functionality on Linux 
must be pursued as a feature request. Please see the link below to open a 
feature request:

http://www.ibm.com/support/docview.wss?uid=swg27005811

Please feel free to contact me if you have any questions regarding this 
issue.

Sincerely,

Basil Kanneth
XL C/C++ and Fortran Support
IBM Software Group - Toronto Lab
+1 905-413-2880



Martin Sebor <se...@roguewave.com> 
06/19/2006 04:09 PM

To
Basil Kanneth/Toronto/IBM@IBMCA
cc

Subject
Re: PMR #: 02264,K78,000-abnormal exit of code on execution






Basil Kanneth wrote:
> Hi Martin, 
> 
> We are investigating the issue.
> 
> We would like to know why you are linking with the static gcc_eh library 

> instead of the shared gcc_s_64 library ? If you can please provide us 
with 
> that information, it would further help our investigation.

Because that's what you guys (i.e., XLC++ support) told us to do
if we wanted to avoid linking with the native C++ Standard Library
(see, for example, Dmitry's response on the subject of PMR 02151).

If linking with gcc_s_64 solves this particular core dump that's
great. But the bigger issue still remains: it's error-prone to
use third party C++ Standard Library with XLC++ on Linux, much
more so than when using gcc or when using XLC++ on AIX. We would
like you to provide a mechanism that makes it as easy as it is
either with gcc or with XLC++ on AIX (i.e., the xlCcore command).

Martin

> 
> Sincerely,
> 
> Basil Kanneth
> XL C/C++ and Fortran Support
> IBM Software Group - Toronto Lab
> +1 905-413-2880
> 
> 
> 
> Basil Kanneth/Toronto/IBM
> 06/14/2006 05:24 PM
> 
> To
> Martin Sebor <se...@roguewave.com>
> cc
> 
> Subject
> Re: PMR #: 02264,K78,000-abnormal exit of code on execution
> 
> 
> 
> 
> 
> Hi Martin, 
> 
> Thank you for bringing my attention to PMR # 02151, K78, 000. I am 
> currently looking into that previous PMR.
> 
> I will get back to you no later than Monday, June 19th, 2006
> 
> Sincerely,
> 
> Basil Kanneth
> XL C/C++ and Fortran Support
> IBM Software Group - Toronto Lab
> +1 905-413-2880


> [XLC++ 8.0/Linux/PPC] SIGSEGV throwing an exception
> ---------------------------------------------------
>
>          Key: STDCXX-199
>          URL: http://issues.apache.org/jira/browse/STDCXX-199
>      Project: C++ Standard Library
>         Type: Bug

>   Components: External
>     Versions: 4.1.3
>  Environment: XLC++ 8.0, gcc 3.3.3, SuSE Linux on PowerPC:
> $ uname -srvp && /lib64/tls/libc.so.6
> Linux 2.6.5-7.191-pseries64 #1 SMP Tue Jun 28 14:58:56 UTC
> 2005 ppc64
> GNU C Library stable release version 2.3.3 (20040412), by
> Roland McGrath et al.
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or
> FITNESS FOR A
> PARTICULAR PURPOSE.
> Configured for ppc64-suse-linux.
> Compiled by GNU CC version 3.3.3 (SuSE Linux).
> Compiled on a Linux 2.6.5 system on 2005-06-03.
> Available extensions:
>         GNU libio by Per Bothner
>         crypt add-on version 2.1 by Michael Glad and others
>         NPTL 0.61 by Ulrich Drepper
>         GNU Libidn by Simon Josefsson
>         BIND-8.2.3-T5B
>         NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
> Thread-local storage support included.
> Report bugs using the `glibcbug' script to <bu...@gnu.org>.
>     Reporter: Martin Sebor

>
> PMR 02264,K78,000
> When compiled and linked with XLC++ 8.0 using the specified command line options the program below exits abnormally. The same program runs successfully to
> completion when compiled and linked with gcc on the same machine (using gcc -g -m64 t.cpp -lsupc++).
> $ cat t.cpp && xlc -qversion && xlc t.cpp -q64 -g -lxlopt -lxl -libmc++ -lsupc++ -lgcc -lgcc_eh && ./a.out 
> struct A { };
> void foo ();
> void bar () throw (A) { return foo (); }
> int foobar ()
> {
>     try {
>         bar ();
>         return 1;
>     }
>     catch (A) { return 0; }
>     catch (...) { }
>     return 2;
> }
> int main ()
> {
>     return foobar ();
> }
> void foo ()
> {
>     struct B: A { };
>     B b;
>     throw b;
> }
> IBM XL C/C++ Advanced Edition V8.0 for Linux   
> Version: 08.00.0000.0000  
> Segmentation fault

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Commented: (STDCXX-199) [XLC++ 8.0/Linux/PPC] SIGSEGV throwing an exception

Posted by "Martin Sebor (JIRA)" <ji...@apache.org>.
    [ http://issues.apache.org/jira/browse/STDCXX-199?page=comments#action_12421684 ] 
            
Martin Sebor commented on STDCXX-199:
-------------------------------------

-------- Original Message --------
Subject: Re: PMR #: 02264,K78,000-abnormal exit of code on execution
Date: 	Fri, 14 Jul 2006 15:57:44 -0400
From: 	Basil Kanneth <bk...@ca.ibm.com>
To: 	Martin Sebor <se...@roguewave.com>

Hi Martin,

We have opened a ticket with SuSE through an internal IBM portal. You 
can view this only if SuSE decides to publish it.

If you have no immediate questions or concerns regarding this PMR, I 
would like to set a follow-up date for Friday, July 21st, 2006.

Please contact me if you have any questions regarding this issue.

Sincerely,

Basil Kanneth
XL C/C++ and Fortran Support
IBM Software Group - Toronto Lab
+1 905-413-2880


*Martin Sebor <se...@roguewave.com>*

07/11/2006 05:58 PM

	
To: Basil Kanneth/Toronto/IBM@IBMCA
cc: 
Subject: Re: PMR #: 02264,K78,000-abnormal exit of code on execution

Basil Kanneth wrote:
 >
 > Hi Martin,
 >
 > Can you please review my previous note regarding the
 > '-qnostaticlink=libgcc' option and let me know if you have any questions
 > regarding this PMR ?

I agree that it's a problem in gcc (we reproduced it with it
as well) or perhaps even in the OS. I'm wondering whether you
reported it to the gcc or SuSE folks and if so, if I could have
the bug number so I can continue to track the issue.

Thanks
Martin

 >
 > Sincerely,
 >
 > Basil Kanneth
 > XL C/C++ and Fortran Support
 > IBM Software Group - Toronto Lab
 > +1 905-413-2880
 >
 >
 > *Basil Kanneth/Toronto/IBM*
 >
 > 07/04/2006 03:33 PM
 >
 >                  
 > To: Martin Sebor <se...@roguewave.com>
 > cc: 
 > Subject: Re: PMR #: 02264,K78,000-abnormal exit of code on executionLink
 > 
<Notes://D25ML04/8525715D00725DDB/DABA975B9FB113EB852564B5001283EA/1421B2B2B77D51908525719900692E90>
 >
 >
 >                  
 >
 >
 >
 >
 > Hi Martin,
 >
 > Has the '-qnostaticlink=libgcc' option fixed the abnormal exit of code
 > on execution ?
 >
 > Sincerely,
 >
 > Basil Kanneth
 > XL C/C++ and Fortran Support
 > IBM Software Group - Toronto Lab
 > +1 905-413-2880

> [XLC++ 8.0/Linux/PPC] SIGSEGV throwing an exception
> ---------------------------------------------------
>
>                 Key: STDCXX-199
>                 URL: http://issues.apache.org/jira/browse/STDCXX-199
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: External
>    Affects Versions: 4.1.3
>         Environment: XLC++ 8.0, gcc 3.3.3, SuSE Linux on PowerPC:
> $ uname -srvp && /lib64/tls/libc.so.6
> Linux 2.6.5-7.191-pseries64 #1 SMP Tue Jun 28 14:58:56 UTC
> 2005 ppc64
> GNU C Library stable release version 2.3.3 (20040412), by
> Roland McGrath et al.
> Copyright (C) 2004 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or
> FITNESS FOR A
> PARTICULAR PURPOSE.
> Configured for ppc64-suse-linux.
> Compiled by GNU CC version 3.3.3 (SuSE Linux).
> Compiled on a Linux 2.6.5 system on 2005-06-03.
> Available extensions:
>         GNU libio by Per Bothner
>         crypt add-on version 2.1 by Michael Glad and others
>         NPTL 0.61 by Ulrich Drepper
>         GNU Libidn by Simon Josefsson
>         BIND-8.2.3-T5B
>         NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
> Thread-local storage support included.
> Report bugs using the `glibcbug' script to <bu...@gnu.org>.
>            Reporter: Martin Sebor
>
> PMR 02264,K78,000
> When compiled and linked with XLC++ 8.0 using the specified command line options the program below exits abnormally. The same program runs successfully to
> completion when compiled and linked with gcc on the same machine (using gcc -g -m64 t.cpp -lsupc++).
> $ cat t.cpp && xlc -qversion && xlc t.cpp -q64 -g -lxlopt -lxl -libmc++ -lsupc++ -lgcc -lgcc_eh && ./a.out 
> struct A { };
> void foo ();
> void bar () throw (A) { return foo (); }
> int foobar ()
> {
>     try {
>         bar ();
>         return 1;
>     }
>     catch (A) { return 0; }
>     catch (...) { }
>     return 2;
> }
> int main ()
> {
>     return foobar ();
> }
> void foo ()
> {
>     struct B: A { };
>     B b;
>     throw b;
> }
> IBM XL C/C++ Advanced Edition V8.0 for Linux   
> Version: 08.00.0000.0000  
> Segmentation fault

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira