[PATCH] D111703: [ARM] __cxa_end_cleanup should be called instead of _UnwindResume.

Daniel Kiss via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 13 03:27:06 PDT 2021


danielkiss created this revision.
danielkiss added reviewers: cjdb, manojgupta, libc++abi, libunwind.
Herald added subscribers: hiraditya, kristof.beyls.
danielkiss requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

ARM EHABI[1] specifies the __cxa_end_cleanup to be called after cleanup.
It will call the UnwindResume. 
__cxa_begin_cleanup will be called from libcxxabi while __cxa_end_cleanup is never called.
This will trigger a termination when a foreign exception is processed while UnwindResume is called
because the global state will be wrong due to the missing __cxa_end_cleanup call.

Additional test here: D109856 <https://reviews.llvm.org/D109856>
[1] https://github.com/ARM-software/abi-aa/blob/main/ehabi32/ehabi32.rst#941compiler-helper-functions


https://reviews.llvm.org/D111703

Files:
  libcxxabi/src/cxa_exception.cpp
  llvm/lib/CodeGen/DwarfEHPrepare.cpp
  llvm/test/CodeGen/ARM/eh-resume-darwin.ll
  llvm/test/CodeGen/ARM/eh-resume.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111703.379326.patch
Type: text/x-patch
Size: 5691 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211013/114aa5cf/attachment.bin>


More information about the llvm-commits mailing list