summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMostyn Bramley-Moore <mostynb@vewd.com>2017-11-29 06:51:42 +0900
committerQijiang Fan <fqj@google.com>2020-06-05 07:53:38 +0900
commit6d0652e22e9b01601cbd9f12053270f139877109 (patch)
tree8bc264739562911756f0425a7133b6b49545ad8b
parenta0d49664ab70e405743a07b1c8f278c0b3f09367 (diff)
downloadlibchrome-6d0652e22e9b01601cbd9f12053270f139877109.tar.gz
[jumbo] use RunningOnValgrind from dynamic_annotations
dynamic_annotations is a small library intended to help tsan code coexist with valgrind. This CL makes the linux sandbox code use the RunningOnValgrind() function instead of (multiply) defining its own version, and does not use the annotations which are being phased out. TODO: remove valgrind checks that are no longer needed (perhaps all of these?) Bug: 786831,349861 Change-Id: I39f83d5dc839c54c5bc9297e9a92bd3f84ead726 Reviewed-on: https://chromium-review.googlesource.com/778881 Commit-Queue: Mostyn Bramley-Moore <mostynb@vewd.com> Reviewed-by: Julien Tinnes <jln@chromium.org> Reviewed-by: danakj <danakj@chromium.org> Cr-Commit-Position: refs/heads/master@{#519858} CrOS-Libchrome-Original-Commit: 452bf63420f4d504dfb8ed8025dd4bd049c72f26
-rw-r--r--base/process/launch_posix.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/base/process/launch_posix.cc b/base/process/launch_posix.cc
index 570cdbf8b4..148ad4f54c 100644
--- a/base/process/launch_posix.cc
+++ b/base/process/launch_posix.cc
@@ -693,10 +693,6 @@ bool GetAppOutputWithExitCode(const CommandLine& cl,
#if defined(OS_LINUX) || defined(OS_NACL_NONSFI) || defined(OS_AIX)
namespace {
-bool IsRunningOnValgrind() {
- return RUNNING_ON_VALGRIND;
-}
-
// This function runs on the stack specified on the clone call. It uses longjmp
// to switch back to the original stack so the child can return from sys_clone.
int CloneHelper(void* arg) {
@@ -759,7 +755,7 @@ pid_t ForkWithFlags(unsigned long flags, pid_t* ptid, pid_t* ctid) {
// without CLONE_VM, so we cannot use libc's clone wrapper when running under
// Valgrind. As a result, the libc pid cache may be incorrect under Valgrind.
// See crbug.com/442817 for more details.
- if (IsRunningOnValgrind()) {
+ if (RunningOnValgrind()) {
// See kernel/fork.c in Linux. There is different ordering of sys_clone
// parameters depending on CONFIG_CLONE_BACKWARDS* configuration options.
#if defined(ARCH_CPU_X86_64)