From db26b7e4b696da5eef91e119001962a7dc28bedc Mon Sep 17 00:00:00 2001 From: Ivan Maidanski Date: Wed, 29 Nov 2017 10:06:34 +0300 Subject: [PATCH] Do not enable mprotect-based incremental mode if unmapping is on (gctest) 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 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/test.c b/tests/test.c index 27dcc047..7fa6f4f2 100644 --- a/tests/test.c +++ b/tests/test.c @@ -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()) { -- 2.40.0