0

Enable DanglingPointerDetector on Mac (dcheck && !official)

The DanglingPointerDetector is currently enabled by default on Linux,
and there are specific bots for other platforms.

This patches adds Mac by default.
Follow-ups:
- Cleanup the mac-rel config.
- Iterate for every other platforms

Benefits:
- No more CQ vs CI differences (See chromium:327473315)
- Increased coverage.

Cq-Include-Trybots: luci.chromium.try:mac_chromium_10.15_rel_ng,mac_chromium_11.0_rel_ng
Include-Ci-Only-Tests: true
Bug: chromium:328104161, chromium:327473315
Change-Id: I2a6ed0e8fdb11cb5b5868befc14fe3e4608e4498
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5371737
Commit-Queue: Arthur Sonzogni <arthursonzogni@chromium.org>
Reviewed-by: Bartek Nowierski <bartekn@chromium.org>
Auto-Submit: Arthur Sonzogni <arthursonzogni@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1280732}
This commit is contained in:
Arthur Sonzogni
2024-04-01 16:09:31 +00:00
committed by Chromium LUCI CQ
parent f90ed52bd8
commit 04d766914d
3 changed files with 7 additions and 6 deletions
base/allocator
build_overrides

@ -42,10 +42,7 @@ const base::FeatureParam<UnretainedDanglingPtrMode>
BASE_FEATURE(kPartitionAllocDanglingPtr,
"PartitionAllocDanglingPtr",
#if BUILDFLAG(ENABLE_DANGLING_RAW_PTR_FEATURE_FLAG) || \
(BUILDFLAG(ENABLE_DANGLING_RAW_PTR_CHECKS) && \
(BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_WIN)) && !defined(OFFICIAL_BUILD) && \
(!defined(NDEBUG) || DCHECK_IS_ON()))
#if BUILDFLAG(ENABLE_DANGLING_RAW_PTR_FEATURE_FLAG)
FEATURE_ENABLED_BY_DEFAULT
#else
FEATURE_DISABLED_BY_DEFAULT

@ -194,6 +194,8 @@ declare_args() {
# This is meant to be used primarily on bots. It is much easier to override
# the feature flags using a binary flag instead of updating multiple bots's
# scripts to pass command line arguments.
#
# TODO(328104161): Remove this flag.
enable_backup_ref_ptr_feature_flag = false
# Build support for Dangling Ptr Detection (DPD) via BackupRefPtr (BRP),
@ -207,7 +209,9 @@ declare_args() {
# This is meant to be used primarily on bots. It is much easier to override
# the feature flags using a binary flag instead of updating multiple bots's
# scripts to pass command line arguments.
enable_dangling_raw_ptr_feature_flag = false
#
# TODO(328104161): Remove this flag.
enable_dangling_raw_ptr_feature_flag = enable_dangling_raw_ptr_checks_default
enable_backup_ref_ptr_instance_tracer = false

@ -77,7 +77,7 @@ enable_backup_ref_ptr_support_default = _is_brp_supported
enable_backup_ref_ptr_slow_checks_default = false
enable_dangling_raw_ptr_checks_default =
enable_backup_ref_ptr_support_default && (is_linux || is_win) &&
enable_backup_ref_ptr_support_default && (is_linux || is_win || is_mac) &&
!is_official_build && (is_debug || dcheck_always_on)
raw_ptr_zero_on_construct_default = true