To be clear, I'm not excluding that this is part of the solution to the
problem. However, with this diff, I see the exact same segfault that I
saw without any diff at all, so I do not think we should land this just
yet.
My suggestion for a diff that would only affect the troublesome amd64
architecture and avoid any possible PIC issues on i386 would be the
below:
Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/node/Makefile,v
retrieving revision 1.114
diff -u -p -r1.114 Makefile
--- Makefile 21 Jan 2023 15:48:25 -0000 1.114
+++ Makefile 21 Jan 2023 17:45:08 -0000
@@ -2,9 +2,6 @@ ONLY_FOR_ARCHS = amd64 aarch64 i386 powe
DPB_PROPERTIES = parallel
USE_WXNEEDED = Yes
-.if ${MACHINE_ARCH} == amd64
-USE_NOEXECONLY = Yes
-.endif
COMMENT = JavaScript runtime built on Chrome's V8 JavaScript engine
@@ -13,7 +10,7 @@ PLEDGE_VER = 1.1.3
DISTFILES = node-pledge-{}${PLEDGE_VER}.tar.gz:0 \
${DISTNAME}-headers.tar.gz \
${DISTNAME}.tar.xz
-REVISION = 0
+REVISION = 1
DISTNAME = node-${NODE_VERSION}
PKGNAME = ${DISTNAME:S/v//g}
Index: patches/patch-deps_v8_src_snapshot_embedded_embedded-file-writer_cc
===================================================================
RCS file: patches/patch-deps_v8_src_snapshot_embedded_embedded-file-writer_cc
diff -N patches/patch-deps_v8_src_snapshot_embedded_embedded-file-writer_cc
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-deps_v8_src_snapshot_embedded_embedded-file-writer_cc 21 Jan 2023 17:26:32 -0000
@@ -0,0 +1,26 @@
+Index: deps/v8/src/snapshot/embedded/embedded-file-writer.cc
+--- deps/v8/src/snapshot/embedded/embedded-file-writer.cc.orig
++++ deps/v8/src/snapshot/embedded/embedded-file-writer.cc
+@@ -137,7 +137,12 @@ void EmbeddedFileWriter::WriteCodeSection(PlatformEmbe
+ w->Comment(
+ "The embedded blob code section starts here. It contains the builtin");
+ w->Comment("instruction streams.");
++
++#if V8_OS_OPENBSD && V8_TARGET_ARCH_X64
++ w->SectionRoData();
++#else
+ w->SectionText();
++
No comments:
Post a Comment