Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f589961

Browse filesBrowse files
targosRafaelGSS
authored andcommitted
Revert "deps: make V8 compilable with older glibc"
This reverts commit 84d455e. PR-URL: #45162 Refs: #45118 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com> Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent afa8291 commit f589961
Copy full SHA for f589961

File tree

Expand file treeCollapse file tree

2 files changed

+20
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+20
-1
lines changed
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.17',
39+
'v8_embedder_string': '-node.18',
4040

4141
##### V8 defaults for Node.js #####
4242

Collapse file

‎deps/v8/src/base/platform/platform-posix.cc‎

Copy file name to clipboardExpand all lines: deps/v8/src/base/platform/platform-posix.cc
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,26 @@ void OS::FreeAddressSpaceReservation(AddressSpaceReservation reservation) {
618618
// Need to disable CFI_ICALL due to the indirect call to memfd_create.
619619
DISABLE_CFI_ICALL
620620
PlatformSharedMemoryHandle OS::CreateSharedMemoryHandleForTesting(size_t size) {
621+
#if V8_OS_LINUX && !V8_OS_ANDROID
622+
// Use memfd_create if available, otherwise mkstemp.
623+
using memfd_create_t = int (*)(const char*, unsigned int);
624+
memfd_create_t memfd_create =
625+
reinterpret_cast<memfd_create_t>(dlsym(RTLD_DEFAULT, "memfd_create"));
626+
int fd = -1;
627+
if (memfd_create) {
628+
fd = memfd_create("V8MemFDForTesting", 0);
629+
}
630+
if (fd == -1) {
631+
char filename[] = "/tmp/v8_tmp_file_for_testing_XXXXXX";
632+
fd = mkstemp(filename);
633+
if (fd != -1) CHECK_EQ(0, unlink(filename));
634+
}
635+
if (fd == -1) return kInvalidSharedMemoryHandle;
636+
CHECK_EQ(0, ftruncate(fd, size));
637+
return SharedMemoryHandleFromFileDescriptor(fd);
638+
#else
621639
return kInvalidSharedMemoryHandle;
640+
#endif
622641
}
623642

624643
// static

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.