aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorChristian Andersen <csandersen3@gmail.com>2024-02-04 17:04:09 +0100
committerChristian Andersen <csandersen3@gmail.com>2024-02-04 17:16:30 +0100
commit64f18675926684056ad1be81a59cfef44944e240 (patch)
tree51918b28847aa55e7c31b5d37928b95b8dedff40 /crypto
parent3d30672656b840756910809a52ac5fe54c24ec01 (diff)
downloadportable-64f18675926684056ad1be81a59cfef44944e240.tar.gz
portable-64f18675926684056ad1be81a59cfef44944e240.tar.bz2
portable-64f18675926684056ad1be81a59cfef44944e240.zip
Windows: Fix assertion pop-up up when using Debug compiled libressl.
When running the signertest, or the test project in https://github.com/libressl/portable/issues/266 an assertion window pops up. This was fixed in afcd4be8a72a 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).
Diffstat (limited to 'crypto')
-rw-r--r--crypto/compat/posix_win.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/crypto/compat/posix_win.c b/crypto/compat/posix_win.c
index c7cf6af..3e78a07 100644
--- a/crypto/compat/posix_win.c
+++ b/crypto/compat/posix_win.c
@@ -164,8 +164,10 @@ static void noop_handler(const wchar_t *expression, const wchar_t *function,
164} 164}
165 165
166#define BEGIN_SUPPRESS_IPH \ 166#define BEGIN_SUPPRESS_IPH \
167 int old_report_mode = _CrtSetReportMode(_CRT_ASSERT, 0); \
167 _invalid_parameter_handler old_handler = _set_thread_local_invalid_parameter_handler(noop_handler) 168 _invalid_parameter_handler old_handler = _set_thread_local_invalid_parameter_handler(noop_handler)
168#define END_SUPPRESS_IPH \ 169#define END_SUPPRESS_IPH \
170 _CrtSetReportMode(_CRT_ASSERT, old_report_mode); \
169 _set_thread_local_invalid_parameter_handler(old_handler) 171 _set_thread_local_invalid_parameter_handler(old_handler)
170 172
171#else 173#else