[libcxx-commits] [libcxx] [libc++] Fix missing 'get_new_handler()' for Windows builds (PR #150182)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Jan 12 02:11:01 PST 2026
https://github.com/philnik777 requested changes to this pull request.
Actually, I've misread it again. We're storing the new handler in two separate places now, so this doesn't work if someone calls `set_new_handler` from MSVC and calls `get_new_handler` from libc++. IoW, the value returned from `get_new_handler` may not be the same as `operator new` would be calling.
This already breaks down if both libc++ and the MSVC STL DLLs are loaded, since there is no guarantee which one is actually used AFAICT. We provide identical symbols in separate DLLs now.
Do we try to load the MSVC STL in other places already possibly? IIRC we have some similar sharing elsewhere. If so, maybe we should just use the MSVC provided functions instead and don't bother providing our own. That should address any concerns I have.
https://github.com/llvm/llvm-project/pull/150182
More information about the libcxx-commits
mailing list