Skip to content

Commit 23e7b25

Browse files
committed
deps: cherry-pick 8957d4677aa794c230577f234071af0 from V8 upstream
Original commit message: 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} Fixes: #36656
1 parent 574590d commit 23e7b25

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

deps/v8/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ Andreas Anyuru <[email protected]>
6161
Andrew Paprocki <[email protected]>
6262
Andrei Kashcha <[email protected]>
6363
Anna Henningsen <[email protected]>
64+
Antoine du Hamel <[email protected]>
6465
Anton Bikineev <[email protected]>
6566
Bangfu Tao <[email protected]>
6667
Daniel Shelton <[email protected]>

deps/v8/src/base/platform/platform-macos.cc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,14 @@ std::vector<OS::SharedLibraryAddress> OS::GetSharedLibraryAddresses() {
4949
for (unsigned int i = 0; i < images_count; ++i) {
5050
const mach_header* header = _dyld_get_image_header(i);
5151
if (header == nullptr) continue;
52-
#if V8_HOST_ARCH_X64
52+
#if V8_HOST_ARCH_I32
53+
unsigned int size;
54+
char* code_ptr = getsectdatafromheader(header, SEG_TEXT, SECT_TEXT, &size);
55+
#else
5356
uint64_t size;
5457
char* code_ptr = getsectdatafromheader_64(
5558
reinterpret_cast<const mach_header_64*>(header), SEG_TEXT, SECT_TEXT,
5659
&size);
57-
#else
58-
unsigned int size;
59-
char* code_ptr = getsectdatafromheader(header, SEG_TEXT, SECT_TEXT, &size);
6060
#endif
6161
if (code_ptr == nullptr) continue;
6262
const intptr_t slide = _dyld_get_image_vmaddr_slide(i);

0 commit comments

Comments
 (0)