update override on macOS with interpose of malloc_default_zone (issues #313)

This commit is contained in:
Daan Leijen 2020-12-15 16:03:54 -08:00
parent 745cf1e2f5
commit bb386025b5
5 changed files with 75 additions and 46 deletions

View file

@ -259,7 +259,7 @@ static _Atomic(uintptr_t) warning_count; // = 0; // when >= max_warning_count s
static mi_decl_thread bool recurse = false;
static bool mi_recurse_enter(void) {
#ifdef MI_TLS_RECURSE_GUARD
#if defined(__MACH__) || defined(MI_TLS_RECURSE_GUARD)
if (_mi_preloading()) return true;
#endif
if (recurse) return false;
@ -268,7 +268,7 @@ static bool mi_recurse_enter(void) {
}
static void mi_recurse_exit(void) {
#ifdef MI_TLS_RECURSE_GUARD
#if defined(__MACH__) || defined(MI_TLS_RECURSE_GUARD)
if (_mi_preloading()) return;
#endif
recurse = false;