Skip to content

Commit

Permalink
Windows: Fix assertion pop-up up when using Debug compiled libressl.
Browse files Browse the repository at this point in the history
When running the signertest, or the test project in 
libressl#266 an assertion window
pops up. This was fixed in afcd4be for a release compiled library.
To prevent the issue in debug mode, it looks like it is necessary to 
also disable the assertion window popup. 

With this all tests pass when compiling and running them with a Debug,
Release or RelWithDebInfo CMake build on windows (for me).
  • Loading branch information
RandomInEqualities authored and busterb committed Mar 3, 2024
1 parent c095124 commit 7eb79e6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions crypto/compat/posix_win.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,10 @@ static void noop_handler(const wchar_t *expression, const wchar_t *function,
}

#define BEGIN_SUPPRESS_IPH \
int old_report_mode = _CrtSetReportMode(_CRT_ASSERT, 0); \
_invalid_parameter_handler old_handler = _set_thread_local_invalid_parameter_handler(noop_handler)
#define END_SUPPRESS_IPH \
_CrtSetReportMode(_CRT_ASSERT, old_report_mode); \
_set_thread_local_invalid_parameter_handler(old_handler)

#else
Expand Down

0 comments on commit 7eb79e6

Please sign in to comment.