From d54d17e04ac6c25b9fb8bc5975c2bad4000f87f8 Mon Sep 17 00:00:00 2001 From: DarthM Date: Tue, 31 Dec 2024 15:18:10 -0500 Subject: [PATCH] makepanda: Fix a crash on apple silicon machines related to cog battles --- makepanda/makepanda.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 3d3ae9e6f1..d717f4cfed 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -2513,6 +2513,11 @@ def WriteConfigSettings(): # If we don't have mimalloc, use DeletedBufferChain as fallback, # which is still more efficient than malloc. dtool_config["USE_DELETED_CHAIN"] = '1' + # this will resolve a crash on apple silicon systems + elif GetTarget() == 'darwin': + # check for system architecture arm64 + if os.uname().machine == 'arm64': + dtool_config["USE_DELETED_CHAIN"] = '1' else: # On other systems, the default malloc seems to be fine. dtool_config["USE_DELETED_CHAIN"] = 'UNDEF'