]> granicus.if.org Git - gc/commitdiff
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 651b9de4d9aff7539f556c3894f6ae4265f305e0..ed70984d5412c1a0751ae0a1f73c3ed0615efa96 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