Do not enable mprotect-based incremental mode if unmapping is on (gctest)
authorIvan Maidanski <ivmai@mail.ru>
Wed, 29 Nov 2017 07:06:34 +0000 (10:06 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 29 Nov 2017 14:08:21 +0000 (17:08 +0300)
Incremental mode based on mprotect() is not compatible with memory
unmapping for now.

* tests/test.c [!PCR && !GC_WIN32_THREADS && !MAKE_BACK_GRAPH
&& !NO_INCREMENTAL] (main): Do not call GC_enable_incremental() if
MPROTECT_VDB && USE_MUNMAP.

tests/test.c

index 27dcc04..7fa6f4f 100644 (file)
@@ -1816,7 +1816,8 @@ void GC_CALLBACK warn_proc(char *msg, GC_word p)
     GC_COND_INIT();
     GC_set_warn_proc(warn_proc);
 #   if defined(MPROTECT_VDB) || defined(PROC_VDB) || defined(GWW_VDB)
-#     if !defined(MAKE_BACK_GRAPH) && !defined(NO_INCREMENTAL)
+#     if !defined(MAKE_BACK_GRAPH) && !defined(NO_INCREMENTAL) \
+         && !(defined(MPROTECT_VDB) && defined(USE_MUNMAP))
         GC_enable_incremental();
 #     endif
       if (GC_is_incremental_mode()) {
@@ -2253,7 +2254,8 @@ int main(void)
     n_tests = 0;
 #   if defined(MPROTECT_VDB)
 #     if !defined(REDIRECT_MALLOC) && !defined(MAKE_BACK_GRAPH) \
-         && !defined(USE_PROC_FOR_LIBRARIES) && !defined(NO_INCREMENTAL)
+         && !defined(USE_PROC_FOR_LIBRARIES) && !defined(NO_INCREMENTAL) \
+         && !(defined(MPROTECT_VDB) && defined(USE_MUNMAP))
         GC_enable_incremental();
 #     endif
       if (GC_is_incremental_mode()) {