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-11-05 09:00:29 +0000
commitce79ab59a09c8891c233f8afc5d66da1685fdd8f (patch)
tree926748390697b0520e3dbd1690785cfc6a49d604
parentd521ec6dd1ed0114b9c6d32b047fb024420a6cda (diff)
downloadqtwebengine-chromium-ce79ab59a09c8891c233f8afc5d66da1685fdd8f.tar.gz
[Backport] Skip deleted object files in POSIX base::debug::StackTrace
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> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-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);