[LLVMbugs] [Bug 17080] New: MCJIT/lli doesn't handle exceptions if something from STL is included.

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Sep 3 04:50:22 PDT 2013


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

            Bug ID: 17080
           Summary: MCJIT/lli doesn't handle exceptions if something from
                    STL is included.
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: MC
          Assignee: unassignedbugs at nondot.org
          Reporter: aist11 at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

It seems exceptions can't be caught in MCJIT/lli if something from STL is used
or even included. At the same time glibc stuff (stdio) works well.

// test.cpp
#include <iostream>

int main() {
  try {
    throw 1;
  }
  cacth (int i) {
    std::cout<<"Exception: <<i<<std::endl;
    return 0;
  }
}


$clang++ -emit-llvm -c test.cpp -o test.bc -fno-use-cxa-atexit

$lli -use-mcjit test.bc

terminate called after throwing an instance of 'int'
0  lli             0x0000000000c62232 llvm::sys::PrintStackTrace(_IO_FILE*) +
34
1  lli             0x0000000000c62099
2  libpthread.so.0 0x00000038f200efa0
3  libc.so.6       0x00000038f1c35a19 gsignal + 57
4  libc.so.6       0x00000038f1c37128 abort + 328
5  libstdc++.so.6  0x00000038f5460545 __gnu_cxx::__verbose_terminate_handler()
+ 341
6  libstdc++.so.6  0x00000038f545e6a6
7  libstdc++.so.6  0x00000038f545e6d3
8  libstdc++.so.6  0x00000038f545e8ff
9  libstdc++.so.6  0x00007f343166a0e1
Stack dump:
0.    Program arguments: lli -use-mcjit test.bc
Aborted

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130903/86f4811d/attachment.html>


More information about the llvm-bugs mailing list