]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Merge libcxxrt commit 5d8a15823a103bbc27f1bfdcf2b5aa008fab57dd
authorMark Johnston <markj@FreeBSD.org>
Mon, 8 Aug 2022 16:30:56 +0000 (12:30 -0400)
committerMark Johnston <markj@FreeBSD.org>
Mon, 8 Aug 2022 16:50:48 +0000 (12:50 -0400)
commitcbd1e83154af8bae3daa3919bb2746d587436515
tree5c47d7b56e5f5118e2e92816d89ce90a17c9e5da
parent2dd83b3f0507fc7bc64b908fb88f285a3b9663c8
Merge libcxxrt commit 5d8a15823a103bbc27f1bfdcf2b5aa008fab57dd

  Fix two bugs in __cxa_end_cleanup()

  Per the EHABI32 specification, __cxa_end_cleanup must take care to
  preserve registers before calling _Unwind_Resume().  So, libcxxrt uses
  an assembly stub which preserves caller-saved registers around the call
  to __cxa_get_cleanup().  But:
  - it failed to restore them properly,
  - it did not preserve the link register.

  Fix both of these problems.  This is needed to fix exception unwinding
  on FreeBSD with LLVM 14.  Note that r4 is callee-saved but is pushed
  onto the stack to preserve stack pointer alignment.

Sponsored-by: The FreeBSD Foundation
MFC after: 1 week
contrib/libcxxrt/exception.cc