Subject: pkg/12620: (pkgsrc:gcc-2.95.2) cannot catch any exception of C++
To: None <gnats-bugs@gnats.netbsd.org>
From: None <tshiozak@netbsd.org>
List: netbsd-bugs
Date: 04/12/2001 03:50:07
>Number: 12620
>Category: pkg
>Synopsis: (pkgsrc:gcc-2.95.2) cannot catch any exception of C++
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Apr 12 03:51:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Takuya SHIOZAKI
>Release: current
>Organization:
>Environment:
NetBSD aoi.prod.astec.co.jp 1.5U NetBSD 1.5U (AOI) #2: Mon Apr 9 17:55:08 JST 2001 root@aoi.prod.astec.co.jp:/usr/src/sys/arch/i386/compile/AOI i386
>Description:
gcc-2.95.2 installed from pkgsrc cannot catch any exception of C++.
Probably, -fno-sjlj-exceptions option is default,
but EH frame is not initialized.
>How-To-Repeat:
NG case:
% cat a.cc
#include <iostream>
int
main()
{
try {
throw int(10);
} catch(...) {
cerr << "exception is raised." << std::endl;
}
return 0;
}
% /usr/pkg/gcc-2.95.2/bin/g++ a.cc
% ./a.out
zsh: 9487 abort ./a.out
OK case:
% /usr/pkg/gcc-2.95.2/bin/g++ -fsjlj-exceptions a.cc
% ./a.out
exception is raised.
>Fix:
flip the default of -fsjlj-exceptions?
>Release-Note:
>Audit-Trail:
>Unformatted: