Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3280)

Unified Diff: chrome/common/child_process_host.cc

Issue 6331002: Do not read /proc/self/exe before forking if Chrome is ran under Valgrind.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/child_process_host.cc
===================================================================
--- chrome/common/child_process_host.cc (revision 71148)
+++ chrome/common/child_process_host.cc (working copy)
@@ -7,6 +7,7 @@
#include "base/command_line.h"
#include "base/metrics/histogram.h"
#include "base/path_service.h"
+#include "base/third_party/dynamic_annotations/dynamic_annotations.h"
#include "chrome/common/child_process_info.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths_internal.h"
@@ -56,7 +57,10 @@
#if defined(OS_LINUX)
// Use /proc/self/exe rather than our known binary path so updates
// can't swap out the binary from underneath us.
- if (allow_self)
+ // When running under Valgrind, forking /proc/self/exe ends up forking the
+ // Valgrind executable, which then crashes. However, it's almost safe to
+ // assume that the updates won't happen while testing with Valgrind tools.
+ if (allow_self && !RunningOnValgrind())
return FilePath("/proc/self/exe");
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698