From: Ivan Maidanski Date: Wed, 29 Nov 2017 07:06:34 +0000 (+0300) Subject: Do not enable mprotect-based incremental mode if unmapping is on (gctest) X-Git-Tag: v7.6.2~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82d92ff75fa4c8140f00729339e87b9509c53370;p=gc Do not enable mprotect-based incremental mode if unmapping is on (gctest) (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. --- diff --git a/tests/test.c b/tests/test.c index 99aa3c50..18c94821 100644 --- a/tests/test.c +++ b/tests/test.c @@ -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");