Workaround spurious gctest exit in incremental mode on Cygwin
authorIvan Maidanski <ivmai@mail.ru>
Thu, 23 May 2019 07:47:00 +0000 (10:47 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Thu, 23 May 2019 09:47:38 +0000 (12:47 +0300)
(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

index 651b9de..ed70984 100644 (file)
@@ -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