From b537fc929b9589399b605adb2194678dfcd52c1a Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Thu, 25 Apr 2024 18:38:21 -0400 Subject: [PATCH] mac: Disable dangling pointer detector (see #3239) This is enabled by default on Mac in M125 but we can't use it until raw_ptr<> is supported by libcef. For background see https://chromium.googlesource.com/chromium/src/+/main/docs/dangling_ptr.md --- tools/gn_args.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/gn_args.py b/tools/gn_args.py index c7f4d84d8..830792eab 100644 --- a/tools/gn_args.py +++ b/tools/gn_args.py @@ -262,8 +262,13 @@ def GetRecommendedDefaultArgs(): # the allocator shim enabled. See issues #3061 and #3095. result['use_partition_alloc_as_malloc'] = False - # These require use_partition_alloc_as_malloc=true, so disable them. + if platform == 'linux' or platform == 'mac': + # Disable dangling pointer detector until raw_ptr<> is enabled (see #3239). + # https://chromium.googlesource.com/chromium/src/+/main/docs/dangling_ptr.md + # These also require use_partition_alloc_as_malloc=true. result['enable_backup_ref_ptr_support'] = False + result['enable_dangling_raw_ptr_checks'] = False + result['enable_dangling_raw_ptr_feature_flag'] = False return result @@ -508,6 +513,8 @@ def GetConfigArgsSandbox(platform, args, is_debug, cpu): # These require use_partition_alloc_as_malloc=true, so disable them. 'enable_backup_ref_ptr_support': False, + 'enable_dangling_raw_ptr_checks': False, + 'enable_dangling_raw_ptr_feature_flag': False, # Avoid /LTCG linker warnings and generate smaller lib files. 'is_official_build': False,