exception aborts the program on x86-32 when a program refers to an external function
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
TCE |
Fix Released
|
Medium
|
Pekka Jääskeläinen |
Bug Description
This is the expected error message from tcecc when the program has a function call to an undefined function:
../../.
However, when running with 32bit x86 the exception that finally is caught in LLVMTCE.cc is not propagated but causes a program abort: terminate called after throwing an instance of 'InstanceNotFound'
This must have something to do with exception handling in LLVM. IIRC LLVM doesn't use exceptions and maybe it disables them completely and this TCE code linked with such a library then fails when trying to propagate an exception through the LLVM libs.
The backtrace:
Program received signal SIGABRT, Aborted.
0x0012d422 in __kernel_vsyscall ()
(gdb) bt
#0 0x0012d422 in __kernel_vsyscall ()
#1 0x02fb7651 in *__GI_raise (sig=6) at ../nptl/
#2 0x02fbaa82 in *__GI_abort () at abort.c:92
#3 0x02f1152f in __gnu_cxx:
#4 0x02f0f465 in ?? () from /usr/lib/
#5 0x02f0f4a2 in std::terminate() () from /usr/lib/
#6 0x02f0f5e1 in __cxa_throw () from /usr/lib/
#7 0x025fdf0c in TTAProgram:
#8 0x025fed59 in TTAProgram:
#9 0x02b4eaca in llvm::LLVMTCEIR
#10 0x017a77ae in llvm::FPPassMan
#11 0x017afe45 in llvm::FPPassMan
#12 0x017af901 in llvm::MPPassMan
#13 0x017afa3a in llvm::PassManag
#14 0x017afb30 in llvm::PassManag
#15 0x02af4b62 in LLVMBackend:
#16 0x02af3b47 in LLVMBackend:
#17 0x0804ad44 in main (argc=13, argv=0xbfffeec4) at LLVMTCE.cc:176
Related branches
Changed in tce: | |
assignee: | nobody → Pekka Jääskeläinen (pekka-jaaskelainen) |
If you can produce input file that triggers exception, I can try on Mac OSX if the OS makes any difference in output.
With 32 and 64bit builds of tools.