[LLVMbugs] [Bug 8098] New: uncaught exception doesn't cause expected behavior

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 7 08:52:33 PDT 2010


           Summary: uncaught exception doesn't cause expected behavior
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: marc.glisse at normalesup.org
                CC: llvmbugs at cs.uiuc.edu, dgregor at apple.com


I am using a snapshot of llvm+clang from yesterday, with the headers of
libstdc++-4.2, on debian testing x64. When I compile and run this code:

#include <stdexcept>
int main(){
        throw std::logic_error("Hello.\nAgain?\n");
        return 0;

with g++ I get this output:
terminate called after throwing an instance of 'std::logic_error'
  what():  Hello.

with clang++ -O2 I just get a segmentation fault. Without -O2, I get "terminate
called without an active exception" before the segfault.

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