summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordaan <daan@effp.org>2022-02-10 11:46:43 -0800
committerdaan <daan@effp.org>2022-02-10 11:46:43 -0800
commit352d8be237e0aaa28f4e9dbcee3a392b19e4339c (patch)
tree836fb9bc8a0660a74d5724c309b2a6fd732a43b4
parente87b1d2298313f2ec47da0d76dbfc195742126fc (diff)
parentccbc8ae0bbfd71928dcb11b16ccad3c54c85e72d (diff)
Merge branch 'dev' into dev-slice
-rw-r--r--CMakeLists.txt2
-rw-r--r--test/test-api.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14ece9e..6406ead 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -158,7 +158,7 @@ if(MI_DEBUG_UBSAN)
if(CMAKE_BUILD_TYPE MATCHES "Debug")
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
message(STATUS "Build with undefined-behavior sanitizer (MI_DEBUG_UBSAN=ON)")
- list(APPEND mi_cflags -fsanitize=undefined -g)
+ list(APPEND mi_cflags -fsanitize=undefined -g -fno-sanitize-recover=undefined)
list(APPEND CMAKE_EXE_LINKER_FLAGS -fsanitize=undefined)
if (NOT MI_USE_CXX)
message(STATUS "(switch to use C++ due to MI_DEBUG_UBSAN)")
diff --git a/test/test-api.c b/test/test-api.c
index 7ce6f11..0302464 100644
--- a/test/test-api.c
+++ b/test/test-api.c
@@ -72,6 +72,10 @@ int main(void) {
CHECK_BODY("calloc0",{
result = (mi_usable_size(mi_calloc(0,1000)) <= 16);
});
+ CHECK_BODY("malloc-large",{ // see PR #544.
+ void* p = mi_malloc(67108872);
+ mi_free(p);
+ });
// ---------------------------------------------------
// Extended