summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2018-08-27 18:41:43 +0000
committerJüri Valdmann <juri.valdmann@qt.io>2018-09-03 07:36:03 +0000
commit79e2dad9ede84883b66feb83a7334febf20f2748 (patch)
tree2f9d735a98975c1dcdd2fa260eb5a47467cb7f9b
parent3779b31a077dea95b06d5432b9256997cf3cf190 (diff)
downloadqtwebengine-chromium-67-based.tar.gz
[Backport] Skip deleted object files in POSIX base::debug::StackTracev5.12.0-alpha167-based
The file names read from /proc/self/maps can contain a special " (deleted)" suffix to indicate that the file has been deleted (unlinked). This is expected and should not trigger a LOG(WARNING). Change-Id: Ia96b3bf1894c8fbd6bfa0c217bc8a01bbb59d750 Reviewed-on: https://chromium-review.googlesource.com/1186622 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org> Cr-Commit-Position: refs/heads/master@{#586334} Task-number: QTBUG-68547 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
-rw-r--r--chromium/base/debug/stack_trace_posix.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/chromium/base/debug/stack_trace_posix.cc b/chromium/base/debug/stack_trace_posix.cc
index f3f05dad26b..54a22c0cc9f 100644
--- a/chromium/base/debug/stack_trace_posix.cc
+++ b/chromium/base/debug/stack_trace_posix.cc
@@ -49,6 +49,7 @@
#include "base/numerics/safe_conversions.h"
#include "base/posix/eintr_wrapper.h"
#include "base/strings/string_number_conversions.h"
+#include "base/strings/string_util.h"
#include "build/build_config.h"
#if defined(USE_SYMBOLIZE)
@@ -690,6 +691,11 @@ class SandboxSymbolizeHelper {
// Skip pseudo-paths, like [stack], [vdso], [heap], etc ...
continue;
}
+ if (base::EndsWith(region.path, " (deleted)",
+ base::CompareCase::SENSITIVE)) {
+ // Skip deleted files.
+ continue;
+ }
// Avoid duplicates.
if (modules_.find(region.path) == modules_.end()) {
int fd = open(region.path.c_str(), O_RDONLY | O_CLOEXEC);