Commit b30fcd47 authored by Benoit Lize's avatar Benoit Lize Committed by Chromium LUCI CQ

[PA] Disable PartitionAlloc-Everywhere for component builds on Android

malloc() shims on Android work by wrapping symbols, which doesn't play
well with component builds. This causes issues for developers, see
linked bug. For details on the underlying reason, see
https://docs.google.com/document/d/1qLqVXS9b99m04Sd0cWRaG8sEXfwulIfkRqSuhdYID_o/edit
(Google-internal).

Bug: 1166748
Change-Id: I8efc385d1e215ac78cbf07a605c477cb17b85a4f
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2631487
Commit-Queue: Benoit L <lizeb@chromium.org>
Reviewed-by: default avatarKentaro Hara <haraken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#844048}
parent 67b5b7d9
......@@ -8,6 +8,12 @@ import("//build/config/sanitizers/sanitizers.gni")
# Sanitizers replace the allocator, don't use our own.
_is_using_sanitizers = is_asan || is_hwasan || is_lsan || is_tsan || is_msan
# - Windows: shims don't work for component builds and debug CRT is not
# compatible, see below.
# - Android: symbol wrapping is not universal for component builds.
_disable_partition_alloc = (is_win && (is_component_build || is_debug)) ||
(is_android && is_component_build)
# The debug CRT on Windows has some debug features that are incompatible with
# the shim. NaCl in particular does seem to link some binaries statically
# against the debug CRT with "is_nacl=false".
......@@ -18,9 +24,8 @@ if ((is_linux || is_chromeos || is_android || is_apple ||
_default_use_allocator_shim = false
}
# TODO(https://crbug.com/1166748): android/x86 is temporarily disabled.
if (_default_use_allocator_shim &&
(is_win || (is_android && target_cpu != "x86"))) {
if (_default_use_allocator_shim && (is_win || is_android) &&
!_disable_partition_alloc) {
_default_allocator = "partition"
} else if (is_android || is_apple || _is_using_sanitizers || is_win ||
is_fuchsia || ((is_linux || is_chromeos) && target_cpu == "arm64") ||
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment