diff --git a/mps/.p4ignore b/mps/.p4ignore index ba720759d8c..fb2e5c024e5 100644 --- a/mps/.p4ignore +++ b/mps/.p4ignore @@ -16,3 +16,5 @@ TAGS *.dSYM code/*/*/*.d *.pyc +test/test/log +test/test/obj diff --git a/mps/code/.p4ignore b/mps/code/.p4ignore index 7a9dfb599a8..dcda2b9ad09 100644 --- a/mps/code/.p4ignore +++ b/mps/code/.p4ignore @@ -9,6 +9,7 @@ lii6ll w3i3mv w3i6mv xci3gc +xci6ll # Visual Studio junk Debug Release diff --git a/mps/code/config.h b/mps/code/config.h index 6878d51b153..f4cd43a54da 100644 --- a/mps/code/config.h +++ b/mps/code/config.h @@ -203,19 +203,32 @@ /* Function attributes */ -/* These are also defined in testlib.h */ +/* Some of these are also defined in testlib.h */ -#if defined(MPS_BUILD_GC) || defined(MPS_BUILD_LL) - -/* GCC: +/* Attribute for functions that take a printf-like format argument, so + * that the compiler can check the format specifiers against the types + * of the arguments. + * GCC: * Clang: */ +#if defined(MPS_BUILD_GC) || defined(MPS_BUILD_LL) #define ATTRIBUTE_FORMAT(ARGLIST) __attribute__((__format__ ARGLIST)) - #else - #define ATTRIBUTE_FORMAT(ARGLIST) +#endif +/* Attribute for functions that should not be instrumented by Clang's + * address sanitizer. + * + */ +#if defined(MPS_BUILD_LL) +#if __has_feature(address_sanitizer) +#define ATTRIBUTE_NO_SANITIZE_ADDRESS __attribute__((__no_sanitize_address__)) +#else +#define ATTRIBUTE_NO_SANITIZE_ADDRESS +#endif +#else +#define ATTRIBUTE_NO_SANITIZE_ADDRESS #endif diff --git a/mps/code/expt825.c b/mps/code/expt825.c index 459452bc722..5947a0cff68 100644 --- a/mps/code/expt825.c +++ b/mps/code/expt825.c @@ -86,7 +86,8 @@ static void register_numbered_tree(mps_word_t tree, mps_arena_t arena) { /* don't finalize ints */ if ((tree & 1) == 0) { - die(mps_finalize(arena, (mps_addr_t *)&tree), "mps_finalize"); + mps_addr_t addr = (void *)tree; + die(mps_finalize(arena, &addr), "mps_finalize"); register_numbered_tree(DYLAN_VECTOR_SLOT(tree, 0), arena); register_numbered_tree(DYLAN_VECTOR_SLOT(tree, 1), arena); } @@ -124,8 +125,8 @@ static void register_indirect_tree(mps_word_t tree, mps_arena_t arena) { /* don't finalize ints */ if ((tree & 1) == 0) { - mps_word_t indirect = DYLAN_VECTOR_SLOT(tree,2); - die(mps_finalize(arena, (mps_addr_t *)&indirect), "mps_finalize"); + mps_addr_t indirect = (void *)DYLAN_VECTOR_SLOT(tree,2); + die(mps_finalize(arena, &indirect), "mps_finalize"); register_indirect_tree(DYLAN_VECTOR_SLOT(tree, 0), arena); register_indirect_tree(DYLAN_VECTOR_SLOT(tree, 1), arena); } diff --git a/mps/code/gc.gmk b/mps/code/gc.gmk index 3b7f0e664b9..608ced354b0 100644 --- a/mps/code/gc.gmk +++ b/mps/code/gc.gmk @@ -13,7 +13,6 @@ CC = gcc CFLAGSDEBUG = -O -g3 CFLAGSOPT = -O2 -g3 CFLAGSCOMPILER := \ - -pedantic \ -Waggregate-return \ -Wall \ -Wcast-qual \ @@ -27,7 +26,7 @@ CFLAGSCOMPILER := \ -Wstrict-aliasing=2 \ -Wstrict-prototypes \ -Wwrite-strings -CFLAGSCOMPILERSTRICT := -ansi +CFLAGSCOMPILERSTRICT := -ansi -pedantic # A different set of compiler flags for less strict compilation, for # instance when we need to #include a third-party header file that diff --git a/mps/code/trace.c b/mps/code/trace.c index b394ed95e80..6fb666925b2 100644 --- a/mps/code/trace.c +++ b/mps/code/trace.c @@ -1462,6 +1462,7 @@ Res TraceScanAreaTagged(ScanState ss, Addr *base, Addr *limit) * This is as TraceScanArea except words are only fixed if they are zero * when masked with a mask. */ +ATTRIBUTE_NO_SANITIZE_ADDRESS Res TraceScanAreaMasked(ScanState ss, Addr *base, Addr *limit, Word mask) { Res res; diff --git a/mps/manual/.p4ignore b/mps/manual/.p4ignore index 3902ee8b103..ef6464692c9 100644 --- a/mps/manual/.p4ignore +++ b/mps/manual/.p4ignore @@ -1,2 +1,3 @@ doctrees converted +html diff --git a/mps/tool/testrun.bat b/mps/tool/testrun.bat index 255ecf23e51..e2b16a00260 100755 --- a/mps/tool/testrun.bat +++ b/mps/tool/testrun.bat @@ -61,7 +61,7 @@ set FAIL_COUNT=0 set SEPARATOR=---------------------------------------- set LOGDIR=%TMP%\mps-%PFM%-%VARIETY%-log echo Logging test output to %LOGDIR% -if exists %LOGDIR% rmdir /q /s %LOGDIR% +if exist %LOGDIR% rmdir /q /s %LOGDIR% mkdir %LOGDIR% if "%1"=="" call :run_tests %ALL_TEST_CASES%