Commit 979dac3f authored by Nico Weber's avatar Nico Weber Committed by Commit Bot

linux: Remove PVALLOC_AVAILABLE

PVALLOC_AVAILABLE was first added in https://codereview.chromium.org/184313002/
5.5 years ago, and it was on on linux if tcmalloc was not being used.
(Or if something outside the build system set the define, something
which can't happen with GN.)

The since-the-new allocator shim handles pvalloc:
base/allocator/allocator_shim_override_linker_wrapped_symbols.h

Furthermore, the non-test use of PVALLOC_AVAILABLE was removed here:
https://chromium-review.googlesource.com/c/chromium/src/+/544844

This unconditionally enables the pvalloc tests on linux; they seem
to pass even with tcmalloc on.

(The motivation is that this removes the only use of USE_TCMALLOC in a .h
file, which makes converting NO_TCMALLOC to a buildflag easier.)

Bug: 550886,961767
Change-Id: I2d5b5399fb8cedd5e07f430f835512b5f120373b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1727149
Commit-Queue: Nico Weber <thakis@chromium.org>
Reviewed-by: default avatarMostyn Bramley-Moore <mostynb@vewd.com>
Auto-Submit: Nico Weber <thakis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#682499}
parent 8af48a77
......@@ -11,14 +11,6 @@
#include "base/process/process_handle.h"
#include "build/build_config.h"
#ifdef PVALLOC_AVAILABLE
// Build config explicitly tells us whether or not pvalloc is available.
#elif defined(LIBC_GLIBC) && !defined(USE_TCMALLOC)
#define PVALLOC_AVAILABLE 1
#else
#define PVALLOC_AVAILABLE 0
#endif
namespace base {
// Enables 'terminate on heap corruption' flag. Helps protect against heap
......
......@@ -307,7 +307,6 @@ TEST_F(OutOfMemoryDeathTest, SecurityValloc) {
}, kOomRegex);
}
#if PVALLOC_AVAILABLE == 1
TEST_F(OutOfMemoryDeathTest, Pvalloc) {
ASSERT_DEATH({
SetUpInDeathAssert();
......@@ -321,7 +320,6 @@ TEST_F(OutOfMemoryDeathTest, SecurityPvalloc) {
value_ = pvalloc(insecure_test_size_);
}, kOomRegex);
}
#endif // PVALLOC_AVAILABLE == 1
TEST_F(OutOfMemoryDeathTest, Memalign) {
ASSERT_DEATH({
......
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