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

Unified Diff: base/third_party/symbolize/symbolize.cc

Issue 2857643002: Let google::Symbolize only print address offset in sanitizer builds. (Closed)
Patch Set: test Created 3 years, 8 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 | content/test/content_browser_test_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/third_party/symbolize/symbolize.cc
diff --git a/base/third_party/symbolize/symbolize.cc b/base/third_party/symbolize/symbolize.cc
index 0932e64abdd48adafb8dde6873f3ea4ae3c0a398..b41a17b8b61dd6a11924a50c11ae4f5a3102c9ae 100644
--- a/base/third_party/symbolize/symbolize.cc
+++ b/base/third_party/symbolize/symbolize.cc
@@ -773,7 +773,10 @@ static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle(void *pc, char *out,
}
// Check whether a file name was returned.
+#if !defined(ADDRESS_SANITIZER) && !defined(LEAK_SANITIZER) && \
+ !defined(MEMORY_SANITIZER) && !defined(THREAD_SANITIZER)
if (object_fd < 0) {
+#endif
if (out[1]) {
// The object file containing PC was determined successfully however the
// object file was not opened successfully. This is still considered
@@ -787,7 +790,10 @@ static ATTRIBUTE_NOINLINE bool SymbolizeAndDemangle(void *pc, char *out,
}
// Failed to determine the object file containing PC. Bail out.
return false;
+#if !defined(ADDRESS_SANITIZER) && !defined(LEAK_SANITIZER) && \
+ !defined(MEMORY_SANITIZER) && !defined(THREAD_SANITIZER)
}
+#endif
FileDescriptor wrapped_object_fd(object_fd);
int elf_type = FileGetElfType(wrapped_object_fd.get());
if (elf_type == -1) {
« no previous file with comments | « no previous file | content/test/content_browser_test_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698