<feed xmlns='http://www.w3.org/2005/Atom'>
<title>llvm-project.git/libcxxabi/src/cxa_exception.cpp, branch main</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.
</subtitle>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/'/>
<entry>
<title>[runtimes][PAC] Harden unwinding when possible (#143230)</title>
<updated>2025-10-20T16:57:45+00:00</updated>
<author>
<name>Oliver Hunt</name>
<email>oliver@apple.com</email>
</author>
<published>2025-10-20T16:57:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e6a1aff5916447630e9ec0e8a90594ca1ee7a1be'/>
<id>e6a1aff5916447630e9ec0e8a90594ca1ee7a1be</id>
<content type='text'>
This hardens the unwinding logic and datastructures on systems
that support pointer authentication.

The approach taken to hardening is to harden the schemas of as many
high value fields in the myriad structs as possible, and then also
explicitly qualify local variables referencing privileged or security
critical values.

This does introduce ABI linkage between libcxx, libcxxabi, and
libunwind but those are in principle separate from the OS itself
so we've kept the schema definitions in the library specific headers
rather than ptrauth.h</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This hardens the unwinding logic and datastructures on systems
that support pointer authentication.

The approach taken to hardening is to harden the schemas of as many
high value fields in the myriad structs as possible, and then also
explicitly qualify local variables referencing privileged or security
critical values.

This does introduce ABI linkage between libcxx, libcxxabi, and
libunwind but those are in principle separate from the OS itself
so we've kept the schema definitions in the library specific headers
rather than ptrauth.h</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++abi] Fix test failures with GCC 14 (#95759)</title>
<updated>2024-06-30T10:09:20+00:00</updated>
<author>
<name>Nikolas Klauser</name>
<email>nikolasklauser@berlin.de</email>
</author>
<published>2024-06-30T10:09:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=0c9f537d41a118c190ba7677175795329f355148'/>
<id>0c9f537d41a118c190ba7677175795329f355148</id>
<content type='text'>
This adds a new `__cxa_call_terminate`, which GCC 14 generates calls to
now. Clang had `__clang_call_terminate` for the same use-case for a long
time. It also fixes a test that is enabled now, since GCC has the
`__has_feature` FTM now.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds a new `__cxa_call_terminate`, which GCC 14 generates calls to
now. Clang had `__clang_call_terminate` for the same use-case for a long
time. It also fixes a test that is enabled now, since GCC has the
`__has_feature` FTM now.</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] Upstream misc. EH changes (#92990)</title>
<updated>2024-05-22T16:47:54+00:00</updated>
<author>
<name>Heejin Ahn</name>
<email>aheejin@gmail.com</email>
</author>
<published>2024-05-22T16:47:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=271eb0686b7b0f9d2e016751399b948ccbbe7925'/>
<id>271eb0686b7b0f9d2e016751399b948ccbbe7925</id>
<content type='text'>
This upstreams more recent, mostly EH changes from libcxx and libcxxabi:
- `__cxa_init_primary_exception`-related changes made when updating to
LLVM 18.1.2 (https://github.com/emscripten-core/emscripten/pull/21638)
- Removes ctype macros
(https://github.com/emscripten-core/emscripten/pull/20960)
- Guard destructor changes with `__wasm__`
(https://github.com/emscripten-core/emscripten/pull/21974)</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This upstreams more recent, mostly EH changes from libcxx and libcxxabi:
- `__cxa_init_primary_exception`-related changes made when updating to
LLVM 18.1.2 (https://github.com/emscripten-core/emscripten/pull/21638)
- Removes ctype macros
(https://github.com/emscripten-core/emscripten/pull/20960)
- Guard destructor changes with `__wasm__`
(https://github.com/emscripten-core/emscripten/pull/21974)</pre>
</div>
</content>
</entry>
<entry>
<title>[WebAssembly] __USING_WASM_EXCEPTIONS__ -&gt; __WASM_EXCEPTIONS__ (#92840)</title>
<updated>2024-05-22T04:01:36+00:00</updated>
<author>
<name>Heejin Ahn</name>
<email>aheejin@gmail.com</email>
</author>
<published>2024-05-22T04:01:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=64f640680f7b1ddc8d2015eac75865f231166f8c'/>
<id>64f640680f7b1ddc8d2015eac75865f231166f8c</id>
<content type='text'>
We've decided to change `__USING_WASM_EXCEPTIONS__` preprocessor to
`__WASM_EXCEPTIONS__` given that it's more concise.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We've decided to change `__USING_WASM_EXCEPTIONS__` preprocessor to
`__WASM_EXCEPTIONS__` given that it's more concise.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++abi] Implement __cxa_init_primary_exception and use it to optimize std::make_exception_ptr (#65534)</title>
<updated>2024-01-22T15:12:41+00:00</updated>
<author>
<name>itrofimow</name>
<email>i.trofimow@yandex.ru</email>
</author>
<published>2024-01-22T15:12:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=51e91b64d0deb6a743861c2a0fba84865250036e'/>
<id>51e91b64d0deb6a743861c2a0fba84865250036e</id>
<content type='text'>
This patch implements __cxa_init_primary_exception, an extension to the 
Itanium C++ ABI. This extension is already present in both libsupc++ and 
libcxxrt. This patch also starts making use of this function in 
std::make_exception_ptr: instead of going through a full throw/catch 
cycle, we are now able to initialize an exception directly, thus making 
std::make_exception_ptr around 30x faster.</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch implements __cxa_init_primary_exception, an extension to the 
Itanium C++ ABI. This extension is already present in both libsupc++ and 
libcxxrt. This patch also starts making use of this function in 
std::make_exception_ptr: instead of going through a full throw/catch 
cycle, we are now able to initialize an exception directly, thus making 
std::make_exception_ptr around 30x faster.</pre>
</div>
</content>
</entry>
<entry>
<title>[libc++abi][WebAssembly] Support Wasm EH</title>
<updated>2023-09-22T07:34:00+00:00</updated>
<author>
<name>Heejin Ahn</name>
<email>aheejin@gmail.com</email>
</author>
<published>2023-08-17T21:57:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=e6cbba749490a20127359a3fbd05d8db7faef535'/>
<id>e6cbba749490a20127359a3fbd05d8db7faef535</id>
<content type='text'>
This adds Wasm-specific libc++abi changes to support Wasm exception
handling (https://github.com/WebAssembly/exception-handling).

Wasm EH requires `__USING_WASM_EXCEPTIONS__` to be defined. Wasm EH's
LSDA handling mostly shares that of SjLj EH.
Changes are:
- In Wasm, a destructor returns its argument.
- Wasm EH currently only has one phase (search) that does both search
  and cleanup. So added an additional `set_registers` to support that.

The bulk of these changes was added back in Mar 2020 in
https://github.com/emscripten-core/emscripten/pull/10577 to emscripten
repo and has been used ever since. Now we'd like to upstream this so
that other toolchains that don't use emscripten libraries, e.g., WASI,
can use this too.

Companion patch: D158919

Reviewed By: dschuff, #libc_abi, phosek

Differential Revision: https://reviews.llvm.org/D158918
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds Wasm-specific libc++abi changes to support Wasm exception
handling (https://github.com/WebAssembly/exception-handling).

Wasm EH requires `__USING_WASM_EXCEPTIONS__` to be defined. Wasm EH's
LSDA handling mostly shares that of SjLj EH.
Changes are:
- In Wasm, a destructor returns its argument.
- Wasm EH currently only has one phase (search) that does both search
  and cleanup. So added an additional `set_registers` to support that.

The bulk of these changes was added back in Mar 2020 in
https://github.com/emscripten-core/emscripten/pull/10577 to emscripten
repo and has been used ever since. Now we'd like to upstream this so
that other toolchains that don't use emscripten libraries, e.g., WASI,
can use this too.

Companion patch: D158919

Reviewed By: dschuff, #libc_abi, phosek

Differential Revision: https://reviews.llvm.org/D158918
</pre>
</div>
</content>
</entry>
<entry>
<title>[runtimes][NFC] Remove stray whitespace on extern C comments</title>
<updated>2023-08-11T17:25:01+00:00</updated>
<author>
<name>Louis Dionne</name>
<email>ldionne.2@gmail.com</email>
</author>
<published>2023-08-11T17:24:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=4e1a23e3fcea102dbf6c5a4742d96b8dc9de59e6'/>
<id>4e1a23e3fcea102dbf6c5a4742d96b8dc9de59e6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>[SystemZ][z/OS] Modify cxxabi to be compatible with existing z/OS runtime</title>
<updated>2022-06-28T18:01:25+00:00</updated>
<author>
<name>Muiez Ahmed</name>
<email>muiez@ibm.com</email>
</author>
<published>2022-06-28T17:59:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=85593e7bb5a8bfde80aaf4eb4e15f982aebe2282'/>
<id>85593e7bb5a8bfde80aaf4eb4e15f982aebe2282</id>
<content type='text'>
This patch is to enable exception handling on the z/OS platform that is compatible with the existing z/OS runtime. No functionality of libcxxabi has been changed for other platforms. With this patch the hope is we can add z/OS as a platform to perform testing on any C++ ABI changes.

There is a primary difference for the z/OS implementation. On z/OS the thrown object is added to a linked list of caught and uncaught exceptions. The unwinder uses the top one as the current exception it is trying to find the landing pad for. We have to pop the top exception after we get it’s landing pad for our unwinder to correctly get any subsequent rethrows or nested exception calls.

Differential Revision: https://reviews.llvm.org/D99913
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This patch is to enable exception handling on the z/OS platform that is compatible with the existing z/OS runtime. No functionality of libcxxabi has been changed for other platforms. With this patch the hope is we can add z/OS as a platform to perform testing on any C++ ABI changes.

There is a primary difference for the z/OS implementation. On z/OS the thrown object is added to a linked list of caught and uncaught exceptions. The unwinder uses the top one as the current exception it is trying to find the landing pad for. We have to pop the top exception after we get it’s landing pad for our unwinder to correctly get any subsequent rethrows or nested exception calls.

Differential Revision: https://reviews.llvm.org/D99913
</pre>
</div>
</content>
</entry>
<entry>
<title>[libcxxabi] Use the right calling convention for exception destructors on i386 Windows</title>
<updated>2022-05-05T20:21:18+00:00</updated>
<author>
<name>Martin Storsjö</name>
<email>martin@martin.st</email>
</author>
<published>2022-05-04T12:50:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=aeb4907ed658ad5538f8cd569facae5beaab2940'/>
<id>aeb4907ed658ad5538f8cd569facae5beaab2940</id>
<content type='text'>
On Windows on i386, C++ member functions use a different calling
convention (`__thiscall`) than the default one for regular functions
(`__cdecl`). (On Windows on architectures other than i386, both calling
convention attributes are no-ops.)

This matches how libstdc++ declares these types.

This fixes the std/thread/futures/futures.{shared,unique}_future/dtor.pass.cpp
tests on i386 mingw.

Differential Revision: https://reviews.llvm.org/D124990
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On Windows on i386, C++ member functions use a different calling
convention (`__thiscall`) than the default one for regular functions
(`__cdecl`). (On Windows on architectures other than i386, both calling
convention attributes are no-ops.)

This matches how libstdc++ declares these types.

This fixes the std/thread/futures/futures.{shared,unique}_future/dtor.pass.cpp
tests on i386 mingw.

Differential Revision: https://reviews.llvm.org/D124990
</pre>
</div>
</content>
</entry>
<entry>
<title>[ARM] __cxa_end_cleanup: avoid clobbering r4</title>
<updated>2022-03-14T22:44:35+00:00</updated>
<author>
<name>Ryan Prichard</name>
<email>rprichard@google.com</email>
</author>
<published>2022-03-14T22:43:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.belthelziquor.com/llvm-project.git/commit/?id=659029302dfb16a29219f931f66e9ad483ad1445'/>
<id>659029302dfb16a29219f931f66e9ad483ad1445</id>
<content type='text'>
The fix for D111703 clobbered r4 both to:
 - Save/restore the original lr.
 - Load the address of _Unwind_Resume for LIBCXXABI_BAREMETAL.

This patch saves and restores lr without clobbering any extra
registers.

For LIBCXXABI_BAREMETAL, it is still necessary to clobber one extra
register to hold the address of _Unwind_Resume, but it seems better to
use ip/r12 (intended for linker veneers/trampolines) than r4 for this
purpose.

The function also clobbers r0 for the _Unwind_Resume function's
parameter, but that is unavoidable.

Reviewed By: danielkiss, logan, MaskRay

Differential Revision: https://reviews.llvm.org/D121432
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The fix for D111703 clobbered r4 both to:
 - Save/restore the original lr.
 - Load the address of _Unwind_Resume for LIBCXXABI_BAREMETAL.

This patch saves and restores lr without clobbering any extra
registers.

For LIBCXXABI_BAREMETAL, it is still necessary to clobber one extra
register to hold the address of _Unwind_Resume, but it seems better to
use ip/r12 (intended for linker veneers/trampolines) than r4 for this
purpose.

The function also clobbers r0 for the _Unwind_Resume function's
parameter, but that is unavoidable.

Reviewed By: danielkiss, logan, MaskRay

Differential Revision: https://reviews.llvm.org/D121432
</pre>
</div>
</content>
</entry>
</feed>
