register openkal-llvm-runtime 0.15.0 - #456
Merged
Merged
Conversation
`thread_local` destructors run, on every target this package builds for. The
defect had three layers and the first two fail differently, which is why
fixing only the first would have been worse than leaving it:
1. EXPORT. Upstream libc++abi exports `__cxa_thread_atexit` on Linux and
Fuchsia only, because elsewhere another runtime already does --- an
ordinary MinGW target gets it from `libmingw32.a`. openkal replaces the C
library and its runtime together, so both sides assumed the other would.
`doctest` and `spdlog` in this repository's own compatibility suite stop
at `ld.lld: error: undefined symbol: __cxa_thread_atexit`.
2. STORAGE. With the guard open the link succeeded AND NOTHING WAS
DESTROYED. The fallback keeps its pending-destructor list in a `__thread`
variable; this runtime is built with `-femulated-tls` for PE, and emutls
keeps its per-thread blocks behind a pthread key of its own whose
destructor had already released this thread's block. Measured under wine,
one thread:
registered dtor, dtors=0x7ffffe994680, &dtors=0x7ffffe9946a8
run_dtors called, dtors=0, &dtors=0x7ffffe9946c8
The list now lives in the TLS key's own value, which no other key's
teardown can reach.
3. APPLE. Surfaced by the criterion written for layer two: clang lowers a
`thread_local` with a destructor to `_tlv_atexit` on Mach-O, and then the
weak-symbol probe for `__cxa_thread_atexit_impl` --- an ELF idiom ld64
does not honour in a static link --- became the error itself.
Criterion, two conditions and neither sufficient, in `examples/cxx` on
x86_64-linux-gnu and x86_64-windows-gnu (wine), `failures: 0`:
ok: a thread_local is constructed in a spawned thread
ok: and its destructor runs when that thread ends
Cross-verified against mcpp 2026.9.21.2 before that engine merged: five jobs
green, including both host-dimension rows. Registration only; nothing is
re-pinned onto it by this change.
Sunrisepeak
added a commit
that referenced
this pull request
Sep 20, 2026
THE TWO MOVE TOGETHER BECAUSE THE MEASUREMENT IS ABOUT WHAT THE PAIR DOES. The engine withdraws `__CYGWIN__`. Four members of this suite --- archive (xz), sqlite3, mimalloc, c-ares --- stopped at `#include <windows.h>` reached through `#if defined(_WIN32) || defined(__CYGWIN__)`, and upstream means "Win32 is available" by that name. THIS MEASUREMENT IS THE CRITERION FOR THAT CHANGE: the `windows.h` group should reach zero, and nothing that ran before should stop running. `runtime` -> 0.15.0 is what keeps the withdrawal safe. It pins openkal-musl 0.19.0, and both read `__MCPP_TARGET_WINDOWS__` in the INSTALLED headers that size `jmp_buf` and `unw_context_t`, keeping `|| defined(__CYGWIN__)` beside it. Measured on the engine branch before it merged: against the PUBLISHED 0.13.0, an openkal program for x86_64-windows-gnu fails on libunwind's two `static_assert`s. Registered and published first --- #453, #455, #456 --- before this line moved. 0.15.0 also makes `thread_local` destructors run, which `doctest` and `spdlog` stop on today with `undefined symbol: __cxa_thread_atexit`. Those two are the other half of what this run should report. `openkal-compat.yml`'s MCPP_VERSION moves with `pins.toml` because that workflow checks the two agree. `latest_mcpp` moves; `min_mcpp` DOES NOT --- this release adds no manifest key, so no client loses the index.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
thread_localdestructors run, on every target this package builds for. Thedefect had three layers and the first two fail differently, which is why
fixing only the first would have been worse than leaving it:
EXPORT. Upstream libc++abi exports
__cxa_thread_atexiton Linux andFuchsia only, because elsewhere another runtime already does --- an
ordinary MinGW target gets it from
libmingw32.a. openkal replaces the Clibrary and its runtime together, so both sides assumed the other would.
doctestandspdlogin this repository's own compatibility suite stopat
ld.lld: error: undefined symbol: __cxa_thread_atexit.STORAGE. With the guard open the link succeeded AND NOTHING WAS
DESTROYED. The fallback keeps its pending-destructor list in a
__threadvariable; this runtime is built with
-femulated-tlsfor PE, and emutlskeeps its per-thread blocks behind a pthread key of its own whose
destructor had already released this thread's block. Measured under wine,
one thread:
The list now lives in the TLS key's own value, which no other key's
teardown can reach.
APPLE. Surfaced by the criterion written for layer two: clang lowers a
thread_localwith a destructor to_tlv_atexiton Mach-O, and then theweak-symbol probe for
__cxa_thread_atexit_impl--- an ELF idiom ld64does not honour in a static link --- became the error itself.
Criterion, two conditions and neither sufficient, in
examples/cxxonx86_64-linux-gnu and x86_64-windows-gnu (wine),
failures: 0:Cross-verified against mcpp 2026.9.21.2 before that engine merged: five jobs
green, including both host-dimension rows. Registration only; nothing is
re-pinned onto it by this change.