From d040adef58bbad6d05a94c073e88be0c728e5dba Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Thu, 23 May 2019 10:47:00 +0300 Subject: [PATCH] Workaround spurious gctest exit in incremental mode on Cygwin (fix of commit fa7f7a72b) * include/private/gcconfig.h [I386 && CYGWIN32 && !USE_WINALLOC] (MPROTECT_VDB): Do not define; add comment. * include/private/gcconfig.h [X86_64 && CYGWIN32 && !USE_WINALLOC && THREAD_LOCAL_ALLOC] (MPROTECT_VDB): Likewise. --- include/private/gcconfig.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/include/private/gcconfig.h b/include/private/gcconfig.h index 651b9de4..ed70984d 100644 --- a/include/private/gcconfig.h +++ b/include/private/gcconfig.h @@ -1550,7 +1550,7 @@ EXTERN_C_BEGIN # ifdef USE_WINALLOC # define GWW_VDB # else -# define MPROTECT_VDB +# /* MPROTECT_VDB does not work, it leads to a spurious exit. */ # ifdef USE_MMAP # define NEED_FIND_LIMIT # define USE_MMAP_ANON @@ -2802,7 +2802,13 @@ EXTERN_C_BEGIN # ifdef USE_WINALLOC # define GWW_VDB # else -# define MPROTECT_VDB +# if defined(THREAD_LOCAL_ALLOC) + /* TODO: For an unknown reason, thread-local allocations */ + /* lead to spurious process exit after the fault handler is */ + /* once invoked. */ +# else +# define MPROTECT_VDB +# endif # ifdef USE_MMAP # define USE_MMAP_ANON # endif -- 2.50.1