[LLVMbugs] [Bug 1945] New: can't catch exception thrown by destructor
bugzilla-daemon at cs.uiuc.edu
bugzilla-daemon at cs.uiuc.edu
Fri Jan 25 01:41:01 PST 2008
http://llvm.org/bugs/show_bug.cgi?id=1945
Summary: can't catch exception thrown by destructor
Product: tools
Version: 2.1
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: llvm-gcc
AssignedTo: unassignedbugs at nondot.org
ReportedBy: jay.foad at antixlabs.com
CC: llvmbugs at cs.uiuc.edu
I'm using LLVM 2.1 on Linux/x86 with the pre-built
"llvm-gcc4.0-2.1-x86-linux-RHEL4" GCC front end.
If I build and run the attached program with LLVM, it terminates:
foad at debian:~$ ~/llvm/llvm-gcc4.0-2.1-x86-linux-RHEL4/bin/llvm-g++ -o dd dd.cc
foad at debian:~$ ./dd
throw
terminate
Aborted
It seems to have failed to catch the exception thrown by D's destructor, even
though the destructor is run inside a try ... catch(...) block.
If I build and run with a "normal" native GCC, it works:
foad at debian:~$ g++ --version
g++ (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Copyright (C) 2006 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.
foad at debian:~$ g++ -o dd dd.cc
foad at debian:~$ ./dd
throw
catch
return
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list