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

Unified Diff: third_party/tcmalloc/chromium/src/base/abort.cc

Issue 10535049: Try not to inline tcmalloc::Abort() so we can find it in stack trace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 6 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 | « third_party/tcmalloc/chromium/src/base/abort.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/base/abort.cc
===================================================================
--- third_party/tcmalloc/chromium/src/base/abort.cc (revision 0)
+++ third_party/tcmalloc/chromium/src/base/abort.cc (working copy)
@@ -0,0 +1,18 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/abort.h"
+
+#include "base/basictypes.h"
+
+namespace tcmalloc {
+
+// Try not to inline so we can find Abort() call from stack trace.
+ATTRIBUTE_NOINLINE void Abort() {
+ // Make a segmentation fault to force abort. Writing to a specific address
+ // so it's easier to find on crash stacks.
+ *(reinterpret_cast<volatile char*>(NULL) + 57) = 0x2001;
+}
+
+} // namespace tcmalloc
Property changes on: third_party/tcmalloc/chromium/src/base/abort.cc
___________________________________________________________________
Added: svn:executable
## -0,0 +1 ##
+*
\ No newline at end of property
« no previous file with comments | « third_party/tcmalloc/chromium/src/base/abort.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698