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]
Other format: [Raw text]

target/8558: Exceptions not caught in 64 bit-mode on Solaris 2.7 (-m64 flag)


>Number:         8558
>Category:       target
>Synopsis:       Exceptions not caught in 64 bit-mode on Solaris 2.7 (-m64 flag)
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 13 06:46:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     n.richartz@secunet.de
>Release:        gcc-3.2-sol7-sparc
>Organization:
>Environment:
Sun Solaris 2.7
>Description:
Compiling a program with the -m64 flag on solaris 2.7 leads to the fact that excaptions can't be caught any more. The immediate result in a segmentation fault.
>How-To-Repeat:
Use the following program:

#include <stdio.h>
#include <exception>

void throwException()
{
        throw std::exception();
}

int main(int argc, char* argv[])
{
        printf("Hello World!\n");
        try
        {
                throwException();
        }
        catch(...)
        {
                printf("Gotcha, Exception\n");
        }
        printf("Hello World2!\n");
        return 0;
}

Compiling with "g++ ExTest.cpp":
bash-2.03$ ./a.out 
Hello World!
Gotcha, Exception
Hello World2!

compiling with "g++ -m64 ExTest.cpp":
bash-2.03$ a.out 
Hello World!
Segmentation Fault (core dumped)
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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