Skip to content

Commit

Permalink
deps: cherry-pick 6bc4bfe from V8 upstream
Browse files Browse the repository at this point in the history
Only changes to src/base/debug/stack_trace_posix.cc included

Original commit message:
    Fixes to V8 GN build process on aix platform

    src/base/debug/stack_trace_posix.cc: suppressed unused function warnings
    for functions DemangleSymbols, OutputPointer(in order to compile with
    -Werror flag)

    test/cctest/test-isolate-independent-builtins.cc: corrections to make
    ByteInText test case compatible with aix. (affects aix only)

    Change-Id: I49e45e63545404c77aaed3f51b26557f6f03455e
    Reviewed-on: https://chromium-review.googlesource.com/927484
    Reviewed-by: Jakob Gruber <[email protected]>
    Reviewed-by: Michael Achenbach <[email protected]>
    Commit-Queue: Jakob Gruber <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#52071}

PR-URL: #23958
Reviewed-By: Refael Ackermann <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Beth Griggs <[email protected]>
Reviewed-By: George Adams <[email protected]>
  • Loading branch information
Vasili Skurydzin authored and rvagg committed Nov 28, 2018
1 parent f473d04 commit 9bedae5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion deps/v8/include/v8-version.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#define V8_MAJOR_VERSION 6
#define V8_MINOR_VERSION 2
#define V8_BUILD_NUMBER 414
#define V8_PATCH_LEVEL 72
#define V8_PATCH_LEVEL 73

// Use 1 for candidates and 0 otherwise.
// (Boolean macro values are not supported by all preprocessors.)
Expand Down
7 changes: 3 additions & 4 deletions deps/v8/src/base/debug/stack_trace_posix.cc
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ const char kMangledSymbolPrefix[] = "_Z";
const char kSymbolCharacters[] =
"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_";

#if HAVE_EXECINFO_H
// Demangles C++ symbols in the given text. Example:
//
// "out/Debug/base_unittests(_ZN10StackTraceC1Ev+0x20) [0x817778c]"
Expand All @@ -81,7 +82,6 @@ void DemangleSymbols(std::string* text) {
// Note: code in this function is NOT async-signal safe (std::string uses
// malloc internally).

#if HAVE_EXECINFO_H

std::string::size_type search_from = 0;
while (search_from < text->size()) {
Expand Down Expand Up @@ -117,9 +117,8 @@ void DemangleSymbols(std::string* text) {
search_from = mangled_start + 2;
}
}

#endif // HAVE_EXECINFO_H
}
#endif // HAVE_EXECINFO_H

class BacktraceOutputHandler {
public:
Expand All @@ -129,6 +128,7 @@ class BacktraceOutputHandler {
virtual ~BacktraceOutputHandler() {}
};

#if HAVE_EXECINFO_H
void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
// This should be more than enough to store a 64-bit number in hex:
// 16 hex digits + 1 for null-terminator.
Expand All @@ -139,7 +139,6 @@ void OutputPointer(void* pointer, BacktraceOutputHandler* handler) {
handler->HandleOutput(buf);
}

#if HAVE_EXECINFO_H
void ProcessBacktrace(void* const* trace, size_t size,
BacktraceOutputHandler* handler) {
// NOTE: This code MUST be async-signal safe (it's used by in-process
Expand Down

0 comments on commit 9bedae5

Please sign in to comment.