https://llvm.org/bugs/show_bug.cgi?id=26012
Bug ID: 26012 Summary: C personality function crashes on ARM EHABI Product: compiler-rt Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: compiler-rt Assignee: unassignedb...@nondot.org Reporter: tzuhsiang.ch...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified If a C function contains a cleanup attribute and the source code is compiled with -fexceptions, then __gcc_personality_v0() will be called by the unwinder. However, our __gcc_personality_v0() implementation in compiler-rt is not compatible with ARM EHABI. Consequently, the mismatch of the function signature will cause a segmentation fault. $ cat cleanup.c extern void my_throw(); int i = 0; void callback(int *p) { i = 1; } void test_cleanup() { int a __attribute__((cleanup(callback))) = 1; my_throw(); } $ gdb ./bad.out ... skipped ... Program received signal SIGSEGV, Segmentation fault. 0xb6f6e910 in unw_get_proc_info () from /opt/llvm/lib/libunwind.so.1 (gdb) bt #0 0xb6f6e910 in unw_get_proc_info () from /opt/llvm/lib/libunwind.so.1 #1 0xb6f73c70 in _Unwind_GetLanguageSpecificData () from /opt/llvm/lib/libunwind.so.1 #2 0x000108fc in __gcc_personality_v0 () Backtrace stopped: previous frame identical to this frame (corrupt stack?) (gdb) NOTE: There is a patch (written by Timon Van Overveldt) in the review process that can fix the problem: http://reviews.llvm.org/D15781 -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs