[libcxx-commits] [libcxx] [libc++] Fix missing 'get_new_handler()' for Windows builds (PR #150182)

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Wed Aug 12 23:58:37 PDT 2026


================
@@ -131,5 +131,9 @@ ABI Affecting Changes
 - ``std::exception_ptr`` now uses the same layout in MSVC mode as on other platforms, changing the size from two to one
   pointer.
 
+- ``std::set_new_handler`` and ``std::get_new_handler`` are now implemented by libc++ on Windows using ``VCRuntime``
+  directly instead of implicitly relying on ``msvcprt`` to implement them, therefore the global state of the handler
+  is no longer shared with ``msvcprt`` since libc++ now maintains its own internal state of the handler.
+
----------------
mstorsjo wrote:

Unless the libcxx maintainers think this is small enough to consider backporting to 23.x?

I guess it could be good to have it live in main for a week or so before doing that, though, but other than that I (who isn't a libcxx maintainer) would think this could be backport worthy.

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


More information about the libcxx-commits mailing list