VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2024-11-15 00:42:19 +0100
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2024-11-15 00:42:19 +0100
commitfc4a54418044263c3173ff9bb793fad698b89cda (patch)
tree8a43433544fc510ddb81acd8ed9037011a410ca3 /src
parent43ad4f93eb2c64bb2c278cdbefdfe0250293868e (diff)
downloadVeraCrypt-fc4a54418044263c3173ff9bb793fad698b89cda.tar.gz
VeraCrypt-fc4a54418044263c3173ff9bb793fad698b89cda.zip
Windows: Use VS builtin __fastfail intrinsic for fatal exception instead of affecting NULL pointer
Diffstat (limited to 'src')
-rw-r--r--src/Common/Tcdefs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Common/Tcdefs.h b/src/Common/Tcdefs.h
index f88ff582..e7eee177 100644
--- a/src/Common/Tcdefs.h
+++ b/src/Common/Tcdefs.h
@@ -240,6 +240,9 @@ void ThrowFatalException(int line);
|| (defined(__GNUC__ ) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))) \
|| (__has_builtin(__builtin_trap))
# define TC_THROW_FATAL_EXCEPTION __builtin_trap()
+#elif defined(_MSC_VER)
+#include <intrin.h>
+# define TC_THROW_FATAL_EXCEPTION __fastfail(FAST_FAIL_FATAL_APP_EXIT)
#else
# define TC_THROW_FATAL_EXCEPTION *(char *) 0 = 0
#endif