[LLVMbugs] [Bug 14227] New: Exception type not reported in terminate() when destructor throws during stack unwinding

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Oct 31 05:57:06 PDT 2012


http://llvm.org/bugs/show_bug.cgi?id=14227

             Bug #: 14227
           Summary: Exception type not reported in terminate() when
                    destructor throws during stack unwinding
           Product: clang
           Version: 3.0
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: ulfalizer at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Compiling and running

struct C {
    ~C() { throw 0; }
};

int main() {
    try {
        C c;
        throw 0;
    } catch(...) {}
}

gives "terminate called without an active exception", whereas with g++ you get
"terminate called after throwing an instance of 'int'".

Changing the handler to catch(C) fixes the problem.

-- 
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