Skip to content

Commit

Permalink
deps: V8: cherry-pick 8957d4677aa7
Browse files Browse the repository at this point in the history
Original commit message:

    [aarm64] Fix GetSharedLibraryAddresses

    This patch fixes a segmentation fault which occurs when using `--prof` flag on a Darwin ARM64 architecture.
    See #36656

    Change-Id: Idc3ce6c8fd8a24f76f1b356f629e37340045b51e
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2609413
    Reviewed-by: Ulan Degenbaev <[email protected]>
    Reviewed-by: Michael Lippautz <[email protected]>
    Commit-Queue: Ulan Degenbaev <[email protected]>
    Cr-Commit-Position: refs/heads/master@{#72886}

Refs: v8/v8@8957d46

PR-URL: #37330
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
targos committed Feb 24, 2021
1 parent b186142 commit 8eeecc1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion common.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Reset this number to 0 on major V8 upgrades.
# Increment by one for each non-official patch applied to deps/v8.
'v8_embedder_string': '-node.14',
'v8_embedder_string': '-node.15',

##### V8 defaults for Node.js #####

Expand Down
1 change: 1 addition & 0 deletions deps/v8/AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Andreas Anyuru <[email protected]>
Andrew Paprocki <[email protected]>
Andrei Kashcha <[email protected]>
Anna Henningsen <[email protected]>
Antoine du Hamel <[email protected]>
Anton Bikineev <[email protected]>
Bangfu Tao <[email protected]>
Daniel Shelton <[email protected]>
Expand Down
8 changes: 4 additions & 4 deletions deps/v8/src/base/platform/platform-macos.cc
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
for (unsigned int i = 0; i < images_count; ++i) {
const mach_header* header = _dyld_get_image_header(i);
if (header == nullptr) continue;
#if V8_HOST_ARCH_X64
#if V8_HOST_ARCH_I32
unsigned int size;
char* code_ptr = getsectdatafromheader(header, SEG_TEXT, SECT_TEXT, &size);
#else
uint64_t size;
char* code_ptr = getsectdatafromheader_64(
reinterpret_cast<const mach_header_64*>(header), SEG_TEXT, SECT_TEXT,
&size);
#else
unsigned int size;
char* code_ptr = getsectdatafromheader(header, SEG_TEXT, SECT_TEXT, &size);
#endif
if (code_ptr == nullptr) continue;
const intptr_t slide = _dyld_get_image_vmaddr_slide(i);
Expand Down

0 comments on commit 8eeecc1

Please sign in to comment.