From ff8aebe76f0c700305e9fea04fa15ace5bd4b321 Mon Sep 17 00:00:00 2001
From: HanifKoh <76276251+HanifKoh@users.noreply.github.com>
Date: Wed, 7 Oct 2026 15:52:18 +0800
Subject: [PATCH] Allow Unsigned Executable Memory in the macOS Entitlements
(#16203)
The Bambu network plug-in's code protector rewrites one page of its own signed __TEXT after loading. The hardened runtime tolerates that until the page is evicted; the next read of it then kills OrcaSlicer with CODESIGNING Invalid Page. Bambu Studio signs with allow-unsigned-executable-memory for this reason; with it added, the same build survives critical memory pressure that killed it in 30 s without.
---
scripts/disable_validation.entitlements | 5 +++++
src/dev-utils/platform/osx/entitlements.plist | 5 +++++
2 files changed, 10 insertions(+)
diff --git a/scripts/disable_validation.entitlements b/scripts/disable_validation.entitlements
index 123d12a53e..af12034ce0 100644
--- a/scripts/disable_validation.entitlements
+++ b/scripts/disable_validation.entitlements
@@ -4,5 +4,10 @@
com.apple.security.cs.disable-library-validation
+
+ com.apple.security.cs.allow-unsigned-executable-memory
+
diff --git a/src/dev-utils/platform/osx/entitlements.plist b/src/dev-utils/platform/osx/entitlements.plist
index 59274f955f..5ba7ca02e3 100644
--- a/src/dev-utils/platform/osx/entitlements.plist
+++ b/src/dev-utils/platform/osx/entitlements.plist
@@ -5,5 +5,10 @@
com.apple.security.cs.disable-library-validation
+
+ com.apple.security.cs.allow-unsigned-executable-memory
+