diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c634807..3fafacbe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,14 +125,9 @@ if(MI_DEBUG_FULL) endif() if(MI_DEBUG_TRACE) - if (APPLE) - message(WARNING "Cannot enable MI_DEBUG_TRACE on Apple") - set(MI_DEBUG_TRACE OFF) - else() - message(STATUS "Enable allocation trace in each heap block (MI_DEBUG_TRACE=ON)") - list(APPEND mi_defines MI_DEBUG_TRACE=1) - set(CMAKE_ENABLE_EXPORTS TRUE) - endif() + message(STATUS "Enable allocation trace in each heap block (MI_DEBUG_TRACE=ON)") + list(APPEND mi_defines MI_DEBUG_TRACE=1) + set(CMAKE_ENABLE_EXPORTS TRUE) endif() if(MI_PADDING_EXTRA) diff --git a/src/options.c b/src/options.c index d0f29593..788a4d60 100644 --- a/src/options.c +++ b/src/options.c @@ -376,7 +376,7 @@ void _mi_stack_trace_print(const char* msg, void** strace, size_t len, const mi_ } } } -#elif (MI_DEBUG_TRACE > 0) && (defined(__linux__) || defined(__FreeBSD__)) +#elif (MI_DEBUG_TRACE > 0) && (defined(__linux__) || defined(__FreeBSD__) || defined(__APPLE__)) #include #define MI_TRACE_LEN (64) void _mi_stack_trace_capture(void** strace, size_t len, size_t skip) { diff --git a/test/main-override-static.c b/test/main-override-static.c index 8b8f7252..692ed45d 100644 --- a/test/main-override-static.c +++ b/test/main-override-static.c @@ -24,8 +24,8 @@ int main() { mi_version(); mi_stats_reset(); // detect double frees and heap corruption - double_free1(); - double_free2(); + // double_free1(); + // double_free2(); double_free3(); corrupt_free1(); // corrupt_free2(); @@ -217,7 +217,7 @@ static void test_reserved(void) { static void negative_stat(void) { - int* p = mi_malloc(60000); + int* p = (int*)mi_malloc(60000); mi_stats_print_out(NULL, NULL); *p = 100; mi_free(p);