[PATCH] D32927: [libc++] Implement exception_ptr on Windows

Billy Robert O'Neal III via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri May 5 17:14:31 PDT 2017


BillyONeal added inline comments.


================
Comment at: include/exception:192
+#endif
+    void* __ptr1_;
+    void* __ptr2_;
----------------
I hope you realize you are doing "evil" unsupported things :). (We won't go out of our way to break this, but if it does break we won't feel bad :P )


================
Comment at: test/std/language.support/support.exception/except.nested/rethrow_if_nested.pass.cpp:12
+
+// This test fails due to a stack overflow
 // XFAIL: LIBCXX-WINDOWS-FIXME
----------------
FWIW it does not pass for our implementation either.

Note that unlike the Itanium ABI, the stack is not popped back to the catch block when handling an exception (because SEH can act like a signal handler and say EXCEPTION_CONTINUE_EXECUTION).


================
Comment at: test/std/language.support/support.exception/propagation/current_exception.pass.cpp:10-11
 
-// exception_ptr has not been implemented on Windows
+// This test needs to be rewritten for the Windows exception_ptr semantics
+// which copy the exception each time the exception_ptr is copied.
 // XFAIL: LIBCXX-WINDOWS-FIXME
----------------
We don't copy the exception each time the exception_ptr is copied -- exception_ptr models shared_ptr. See: "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.10.25017\crt\src\stl\excptptr.cpp"

We do make a copy when making the initial exception_ptr.


https://reviews.llvm.org/D32927





More information about the cfe-commits mailing list