Differential D36179 Diff 109344 www/qt6-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc
Changeset View
Changeset View
Standalone View
Standalone View
www/qt6-webengine/files/patch-src_3rdparty_chromium_base_debug_stack__trace__posix.cc
- This file was added.
--- src/3rdparty/chromium/base/debug/stack_trace_posix.cc.orig 2021-11-25 09:20:12 UTC | |||||
+++ src/3rdparty/chromium/base/debug/stack_trace_posix.cc | |||||
@@ -35,7 +35,7 @@ | |||||
#include <AvailabilityMacros.h> | |||||
#endif | |||||
-#if defined(OS_LINUX) || defined(OS_CHROMEOS) | |||||
+#if defined(OS_LINUX) || defined(OS_CHROMEOS) || defined(OS_BSD) | |||||
#include "base/debug/proc_maps_linux.h" | |||||
#endif | |||||
@@ -659,13 +659,21 @@ class SandboxSymbolizeHelper { | |||||
// Reads /proc/self/maps. | |||||
std::string contents; | |||||
if (!ReadProcMaps(&contents)) { | |||||
+#if defined(OS_BSD) | |||||
+ LOG(ERROR) << "Failed to read /proc/curproc/map"; | |||||
+#else | |||||
LOG(ERROR) << "Failed to read /proc/self/maps"; | |||||
+#endif | |||||
return false; | |||||
} | |||||
// Parses /proc/self/maps. | |||||
if (!ParseProcMaps(contents, ®ions_)) { | |||||
+#if defined(OS_BSD) | |||||
+ LOG(ERROR) << "Failed to parse the contents of /proc/curproc/map"; | |||||
+#else | |||||
LOG(ERROR) << "Failed to parse the contents of /proc/self/maps"; | |||||
+#endif | |||||
return false; | |||||
} | |||||
@@ -696,7 +704,11 @@ class SandboxSymbolizeHelper { | |||||
// Skip regions with empty file names. | |||||
continue; | |||||
} | |||||
+#if defined(OS_BSD) | |||||
+ if (region.path[0] == '-') { | |||||
+#else | |||||
if (region.path[0] == '[') { | |||||
+#endif | |||||
// Skip pseudo-paths, like [stack], [vdso], [heap], etc ... | |||||
continue; | |||||
} |