Skip to content

Commit 418fc5a

Browse files
committed
docs(remediation): A1 addendum — forensics-driven revision + xim llvm dylib self-containment item
1 parent f207cac commit 418fc5a

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

.agents/docs/2026-07-08-root-cause-remediation-design.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,33 @@ dylib reference at all).
5252
`xlings install llvm -y` first); delete the "TestBinary → system -lc++"
5353
comment block. LLVM 22.1.8 becomes usable on macOS.
5454

55+
### A1 addendum — evidence-driven revision (CI forensics, rounds 1–7)
56+
57+
The dynamic-dylib design above was falsified by crash-report forensics:
58+
this llvm distribution's libc++abi/libunwind dylibs upward-link
59+
/usr/lib/libc++, so the SYSTEM libc++ always loads beside the toolchain's
60+
(.ips image list), and gtest's initializers constructed a stringstream in
61+
one copy and destroyed it in the other
62+
(BUG_IN_CLIENT_OF_LIBMALLOC_POINTER_BEING_FREED at locale::~locale).
63+
64+
Process invariant: exactly one ACTIVE libc++ state per process. Options:
65+
system -lc++ (the original workaround — falsified by __hash_memory);
66+
toolchain dylib + rpath (falsified above); **static -load_hidden archives
67+
— adopted**: the already-proven distributable model, now uniform across
68+
ALL mcpp-built binaries (tests were the only exception, and the exception
69+
was the landmine); fixing the distribution itself — see below.
70+
71+
**Ecosystem root fix (new item, xim llvm packaging)**: rewrite the
72+
packaged lib/*.dylib install names/deps at packaging time (@rpath
73+
inter-references, no /usr/lib/libc++ upward link) so the dylib set is
74+
self-contained. Owned by the xlings-res/llvm builder; the C.1 consumer
75+
smoke gate keeps non-self-contained packages out of the index. Until
76+
then, dynamic toolchain-libc++ linking stays unsupported on macOS.
77+
78+
Also part of the exit criteria: mcpp.toml's own macos toolchain pin moves
79+
with the current llvm (20.1.7 → 22.1.8) so mcpp builds itself on what
80+
users get.
81+
5582
## A2 — GCC 15 module instantiation: raise the cross-toolchain floor (repos `xlings-res` packaging + `mcpp` CI)
5683

5784
**Defect anchor**: `src/manifest/types.cppm` `force_template_instantiations()`

0 commit comments

Comments
 (0)