summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2022-01-19 09:28:52 +0300
committerIvan Maidanski <ivmai@mail.ru>2022-02-21 23:19:00 +0300
commit5124a4897cace01d0bf7c11ae28361794e2c71d3 (patch)
treed0a4cabbeff3a15080f89097297b6f2f3067fd25
parent6df5eb1335b191c42763d205a6795bdb590f19b7 (diff)
downloadbdwgc-5124a4897cace01d0bf7c11ae28361794e2c71d3.tar.gz
Fix hang in GC_free if GC_PREFER_MPROTECT_VDB (Mingw64)
(a cherry-pick of commit 0a32dd39a from 'release-8_2') Disable MPROTECT_VDB for Mingw64 (mingw-w64-x86_64) because SetUnhandledExceptionFilter() is not working proporly in this runtime (GC_write_fault_handler is never invoked), at least as of Mingw64 x86_64-8.1.0-release. * include/private/gcconfig.h [X86_64 && MSWIN32 && !__INTEL_COMPILER && GC_GNUC_PREREQ(4,7)] (MPROTECT_VDB): Do not define if __MINGW64__; update comment.
-rw-r--r--include/private/gcconfig.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h
index ba528798..d695b668 100644
--- a/include/private/gcconfig.h
+++ b/include/private/gcconfig.h
@@ -2806,9 +2806,9 @@ EXTERN_C_BEGIN
/* STACKBOTTOM and DATASTART are handled specially in */
/* os_dep.c. */
# if !defined(__GNUC__) || defined(__INTEL_COMPILER) \
- || GC_GNUC_PREREQ(4, 7)
- /* Older GCC has not supported SetUnhandledExceptionFilter */
- /* properly on x64 (e.g. SEH unwinding information missed). */
+ || (GC_GNUC_PREREQ(4, 7) && !defined(__MINGW64__))
+ /* Older GCC and Mingw-w64 (both GCC and Clang) do not */
+ /* support SetUnhandledExceptionFilter() properly on x64. */
# define MPROTECT_VDB
# endif
# define GWW_VDB