[LLVMbugs] [Bug 22270] New: libunwind: fallback implementation of _dyld_find_unwind_sections fails to build for __LP64__ and crashes during exception throwing
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jan 20 10:58:42 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22270
Bug ID: 22270
Summary: libunwind: fallback implementation of
_dyld_find_unwind_sections fails to build for __LP64__
and crashes during exception throwing
Product: libc++abi
Version: unspecified
Hardware: PC
OS: All
Status: NEW
Severity: normal
Priority: P
Component: All Bugs
Assignee: unassignedbugs at nondot.org
Reporter: jeremyhu at apple.com
CC: llvmbugs at cs.uiuc.edu, mclow.lists at gmail.com
Classification: Unclassified
Created attachment 13710
--> http://llvm.org/bugs/attachment.cgi?id=13710&action=edit
test_throw.cxx
A simple exception throw in C++ will cause a crash on Leopard. Similar results
are observed if building libunwind.dylib on Syrah and forcing it to use the
fallback implementation of _dyld_find_unwind_sections.
$ git clone https://github.com/jeremyhu/libcxxabi.git
$ cd libcxxabi/src/Unwind
$ git checkout debug-dyld_find_unwind_sections
$ make LIBDIR=/usr/lib/system LIBUNWIND_FILENAME=libunwind.dylib CFLAGS="-g3
-O0" CXXFLAGS="-g3 -O0"
...
$ clang++ -arch x86_64 test_throw.cxx -o test_throw.x86_64
$ DYLD_LIBRARY_PATH=. ./test_throw.x86_64
Segmentation fault: 11
$ clang++ -arch i386 test_throw.cxx -o test_throw.i386
$ DYLD_LIBRARY_PATH=. ./test_throw.i386
Segmentation fault: 11
---
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libmacho.dylib 0x9335236c getsectiondata + 49
1 libunwind.dylib 0x000f4932
libunwind::_dyld_find_unwind_sections(void*, libunwind::dyld_unwind_sections*)
+ 114 (.AddressSpace.hpp:317)
2 libunwind.dylib 0x000f5a4b
libunwind::LocalAddressSpace::findUnwindSections(unsigned int,
libunwind::UnwindInfoSections&) + 43 (.AddressSpace.hpp:337)
3 libunwind.dylib 0x000f54b2
libunwind::UnwindCursor<libunwind::LocalAddressSpace,
libunwind::Registers_x86>::setInfoBasedOnIPRegister(bool) + 114
(.UnwindCursor.hpp:1158)
4 libunwind.dylib 0x000f3ef0 unw_init_local + 176
(libunwind.cpp:63)
5 libunwind.dylib 0x000f057d unwind_phase1 + 77
(UnwindLevel1.c:34)
6 libunwind.dylib 0x000f04dd _Unwind_RaiseException + 157
(UnwindLevel1.c:343)
7 libc++abi.dylib 0x98e794c8 __cxa_throw + 103
8 test_throw.i386 0x000eae2a main + 90
9 libdyld.dylib 0x90c546d9 start + 1
--
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/20150120/24c0635b/attachment.html>
More information about the llvm-bugs
mailing list