You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue #3586 and PR #3601 introduced a regression by faulty Structured Exception Handling (SEH) in Visual Studio / MSBuild environments. The change was trying to remove the MS-specific __try and __except that are used to set the thread name for debugging. This exception mechanism is the Microsoft way of setting the thread name, see:
There is a newer SetThreadDescription API but it is not available in all supported versions of Windows.
The __try/__except form was replaced by a bunch of NT API calls that appear to be mimicking SEH. Under most circumstances it seems ok, e.g. running and debugging seem to work without error and the thread names are set when debugging in Visual Studio. However, in OpenCppCoverage it is triggering an unhandled SEH exception which leads to an abort:
Using ZeroMQ 4.3.2, no unhandled SEH exception is seen by OpenCppCoverage, so this change did not preserve the semantics of the __try/__except construct.
Environment
libzmq version: 4.3.3, 4.3.4
OS: Windows 10
Compiler: Visual Studio 2015
Minimal test code / Steps to reproduce the issue
Run the following under any recent OpenCppCoverage (e.g. 0.9.9.0):
What's the actual result? (include assertion message & call stack if applicable)
An unhandled exception (in the SEH sense, not the C++ exception sense) is detected by OpenCppCoverage and the program is aborted with:
----------------------------------------------------
*** Your application has thrown an unhandled exception. Code: 1080890248: Unknown
----------------------------------------------------
What's the expected result?
No error occurs and the program exits cleanly.
The text was updated successfully, but these errors were encountered:
Issue description
Issue #3586 and PR #3601 introduced a regression by faulty Structured Exception Handling (SEH) in Visual Studio / MSBuild environments. The change was trying to remove the MS-specific
__try
and__except
that are used to set the thread name for debugging. This exception mechanism is the Microsoft way of setting the thread name, see:https://docs.microsoft.com/en-us/visualstudio/debugger/how-to-set-a-thread-name-in-native-code?view=vs-2019#set-a-thread-name-by-throwing-an-exception
There is a newer
SetThreadDescription
API but it is not available in all supported versions of Windows.The
__try
/__except
form was replaced by a bunch of NT API calls that appear to be mimicking SEH. Under most circumstances it seems ok, e.g. running and debugging seem to work without error and the thread names are set when debugging in Visual Studio. However, in OpenCppCoverage it is triggering an unhandled SEH exception which leads to an abort:OpenCppCoverage/OpenCppCoverage#141
Using ZeroMQ 4.3.2, no unhandled SEH exception is seen by OpenCppCoverage, so this change did not preserve the semantics of the
__try
/__except
construct.Environment
Minimal test code / Steps to reproduce the issue
Run the following under any recent OpenCppCoverage (e.g. 0.9.9.0):
What's the actual result? (include assertion message & call stack if applicable)
An unhandled exception (in the SEH sense, not the C++ exception sense) is detected by OpenCppCoverage and the program is aborted with:
What's the expected result?
No error occurs and the program exits cleanly.
The text was updated successfully, but these errors were encountered: