[PATCH] D33261: [CrashRecovery] Use SEH __try instead of VEH when available

Zachary Turner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 16 16:58:33 PDT 2017


zturner accepted this revision.
zturner added a comment.
This revision is now accepted and ready to land.

looks good with suggested fixes.



================
Comment at: llvm/lib/Support/CrashRecoveryContext.cpp:257
   // our handler).  This 1) isn't likely, and 2) shouldn't cause problems.
-  PVOID handle = ::AddVectoredExceptionHandler(1, ExceptionHandler);
+  PVOID handle = ::AddVectoredExceptionHandler(0, ExceptionHandler);
   sCurrentExceptionHandle.set(handle);
----------------
Since we've changed this value from 1 to 0, the comment above should be fixed, perhaps with an explanation of why going last is preferable.


================
Comment at: llvm/unittests/Support/CrashRecoveryTest.cpp:79
+// Don't let Windows Unicode macros change the name of our test.
+#undef OutputDebugString
+
----------------
Just call the test something else?  `CallOutputDebugString`?


https://reviews.llvm.org/D33261





More information about the llvm-commits mailing list