]> granicus.if.org Git - gc/commitdiff
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>
Fri, 15 Dec 2017 18:18:06 +0000 (21:18 +0300)
(Cherry-pick commit db26b7e4 from 'master' branch.)

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 99aa3c508ff5ec00512b423c76bd5fd82d0c7d02..18c9482151460831d0ec8f539bf351b0ca0cd0c1 100644 (file)
@@ -1810,7 +1810,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)) \
-          && !defined(MAKE_BACK_GRAPH) && !defined(NO_INCREMENTAL)
+          && !defined(MAKE_BACK_GRAPH) && !defined(NO_INCREMENTAL) \
+          && !(defined(MPROTECT_VDB) && defined(USE_MUNMAP))
       GC_enable_incremental();
       GC_printf("Switched to incremental mode\n");
 #     ifdef PROC_VDB
@@ -2243,7 +2244,7 @@ int main(void)
     n_tests = 0;
 #   if defined(MPROTECT_VDB) && !defined(REDIRECT_MALLOC) \
             && !defined(MAKE_BACK_GRAPH) && !defined(USE_PROC_FOR_LIBRARIES) \
-            && !defined(NO_INCREMENTAL)
+            && !defined(NO_INCREMENTAL) && !defined(USE_MUNMAP)
         GC_enable_incremental();
         GC_printf("Switched to incremental mode\n");
         GC_printf("Emulating dirty bits with mprotect/signals\n");