From 0fb32be6845348b5238f51bae9273f5f3d19393a Mon Sep 17 00:00:00 2001 From: VerteDinde Date: Tue, 1 Mar 2022 12:10:59 -0800 Subject: [PATCH] fix: disable partition alloc on mac --- patches/chromium/.patches | 1 + ...build_disable_partition_alloc_on_mac.patch | 23 +++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 patches/chromium/build_disable_partition_alloc_on_mac.patch diff --git a/patches/chromium/.patches b/patches/chromium/.patches index 174a219c8b744..65d9285761986 100644 --- a/patches/chromium/.patches +++ b/patches/chromium/.patches @@ -111,3 +111,4 @@ fix_dont_delete_SerialPortManager_on_main_thread.patch feat_add_data_transfer_to_requestsingleinstancelock.patch fix_crash_when_saving_edited_pdf_files.patch port_autofill_colors_to_the_color_pipeline.patch +build_disable_partition_alloc_on_mac.patch diff --git a/patches/chromium/build_disable_partition_alloc_on_mac.patch b/patches/chromium/build_disable_partition_alloc_on_mac.patch new file mode 100644 index 0000000000000..944a1f80f3927 --- /dev/null +++ b/patches/chromium/build_disable_partition_alloc_on_mac.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: VerteDinde +Date: Tue, 1 Mar 2022 12:07:25 -0800 +Subject: build: disable partition alloc on mac + +Enabling partition alloc caused a crash when spawning +a child process. This patch disables partition alloc for mac, +and can be removed when the crash in fork is resolved. +Related issue: https://github.com/electron/electron/issues/32718 + +diff --git a/base/allocator/allocator.gni b/base/allocator/allocator.gni +index 56acfed89ec4ad4ee568a1b517923efa4b4e9c1f..a1da35a84f896d158ac88368ff6d95025a23ff95 100644 +--- a/base/allocator/allocator.gni ++++ b/base/allocator/allocator.gni +@@ -20,7 +20,7 @@ _disable_partition_alloc = is_component_build || (is_win && is_debug) + + # - NaCl: No plans to support it. + # - iOS: not done yet. +-_is_partition_alloc_platform = !is_nacl && !is_ios ++_is_partition_alloc_platform = !is_nacl && !is_ios && !is_mac + + # Under Windows Debug the allocator shim is not compatible with CRT. + # NaCl in particular does seem to link some binaries statically