From 4fa76f374c0c35c9c7d186e8addf6861e98baaec Mon Sep 17 00:00:00 2001 From: cheneym2 Date: Tue, 5 Nov 2024 17:28:36 -0500 Subject: Catch all exceptions in render-test (#5495) Catch all exceptions in render-test In MSVC, the /EHsc flag is used by default, it causes only C++ (synchronous) exceptions to be caught by try/catch blocks. The /EHa flag can instead be used to catch both synchronous C++ exceptions as well as structured asynchronous exceptions such as those seen in segfaults or other typical bugs. Using /EHa allows render-test to not crash completely if there is a buggy graphics driver in the system. Issue 5275 --- tools/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) (limited to 'tools') diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt index 9af17b349..ef4d17556 100644 --- a/tools/CMakeLists.txt +++ b/tools/CMakeLists.txt @@ -276,6 +276,7 @@ if(SLANG_ENABLE_TESTS) EXTRA_COMPILE_DEFINITIONS_PRIVATE $<$:RENDER_TEST_CUDA> $<$:RENDER_TEST_OPTIX> + EXTRA_COMPILE_OPTIONS_PRIVATE /EHa OUTPUT_NAME render-test-tool REQUIRED_BY slang-test FOLDER test/tools -- cgit v1.2.3