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

Unified Diff: src/base/debug/stack_trace_posix.cc

Issue 2324453002: AIX: Disable backtrace API call (Closed)
Patch Set: Created 4 years, 3 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 | src/v8.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/base/debug/stack_trace_posix.cc
diff --git a/src/base/debug/stack_trace_posix.cc b/src/base/debug/stack_trace_posix.cc
index cbd722d35cda9e12a33898c912f4da4794148599..c4bccc81c81d02f63d080f48f1231ee145318443 100644
--- a/src/base/debug/stack_trace_posix.cc
+++ b/src/base/debug/stack_trace_posix.cc
@@ -145,6 +145,9 @@ void ProcessBacktrace(void* const* trace, size_t size,
bool printed = false;
+// NOTE: backtrace_symbol API is not supported on AIX and there is no
+// equivalent user-mode API. For now disabling the call to the API
rmcilroy 2016/09/08 10:10:10 No need for the comment (there are probably other
+#if !V8_OS_AIX
rmcilroy 2016/09/08 10:10:10 Could you instead ifdef out the whole of ProcessBa
// Below part is async-signal unsafe (uses malloc), so execute it only
// when we are not executing the signal handler.
if (in_signal_handler == 0) {
@@ -162,6 +165,7 @@ void ProcessBacktrace(void* const* trace, size_t size,
printed = true;
}
}
+#endif
if (!printed) {
for (size_t i = 0; i < size; ++i) {
@@ -356,12 +360,18 @@ void DisableSignalStackDump() {
}
StackTrace::StackTrace() {
+// NOTE: backtrace API is not supported on AIX and there is no
+// equivalent user-mode API. For now disabling the call to the API
rmcilroy 2016/09/08 10:10:10 No need for the comment
+#if V8_OS_AIX
rmcilroy 2016/09/08 10:10:10 Could you make this #if !V8_OS_AIX and swap the br
+ count_ = 0;
+#else
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
// Though the backtrace API man page does not list any possible negative
// return values, we take no chance.
count_ = static_cast<size_t>(backtrace(trace_, arraysize(trace_)));
+#endif
}
void StackTrace::Print() const {
« no previous file with comments | « no previous file | src/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698