[llvm-bugs] [Bug 26012] New: C personality function crashes on ARM EHABI
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jan 4 06:58:02 PST 2016
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: unassignedbugs at nondot.org
Reporter: tzuhsiang.chien at gmail.com
CC: llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160104/ac889cc0/attachment.html>
More information about the llvm-bugs
mailing list