[libcxx-commits] [libcxx] Add C++23 stacktrace (P0881R7) (PR #136528)

Steve O'Brien via libcxx-commits libcxx-commits at lists.llvm.org
Mon Sep 1 11:50:16 PDT 2025


elsteveogrande wrote:

Thank you so much @philnik777  and @Zingam  for the thoughtful and thorough feedback!
For a libcxx first-timer this is very helpful and very appreciated!

I will begin addressing these and might be at it for a while :)

Real quick, I see a couple of problems in CI that I don't know how to get around.
In these two scenarios, in CI and running buildbot locally:

```
macos (apple-system, macos-15)
macos (apple-system-hardened, macos-15)
```

there's a missing symbol:

```
# .---command stderr------------
# | dyld[29663]: Symbol not found: __ZNSt3__112__stacktrace4base12current_implEmm
# |   Referenced from: <15D1B55C-FB38-3D06-A73B-2269ED9FD3D8> /Users/steve/code/llvm-project/build/apple-system/cxx/libcxx/test/libcxx/stacktrace/Output/simple.o3.nosplit.pass.cpp.dir/t.tmp.exe (built for macOS 15.6.1 which is newer than running OS)
# |   Expected in:     <643ED232-CE19-3F63-8015-0AEE768C002F> /usr/lib/libc++.1.dylib
# `-----------------------------

a/k/a:
std::__1::__stacktrace::base::current_impl(unsigned long, unsigned long)
```

It's defined in `impl.cpp`, and indeed works in other buildbot runs.
I see this symbol in the newly-built dynamic lib (but not in the static lib).

```
~/code/llvm-project$ nm build/apple-system/cxx/lib/libc++.a  | grep __ZNSt3__112__stacktrace4base12current_implEmm
0000000000000000 T __ZNSt3__112__stacktrace4base12current_implEmm

~/code/llvm-project$ nm build/apple-system/cxx/lib/libc++.dylib  | grep __ZNSt3__112__stacktrace4base12current_implEmm
0000000000027200 T __ZNSt3__112__stacktrace4base12current_implEmm
```

I see that it's expected in `/usr/lib/libc++.1.dylib`, which I assume is the system-provided
(I guess from apple Command Line Tools), which is strange.


https://github.com/llvm/llvm-project/pull/136528


More information about the libcxx-commits mailing list