head 1.3; access; symbols pkgsrc-2025Q3:1.1.0.2 pkgsrc-2025Q3-base:1.1; locks; strict; comment @// @; 1.3 date 2026.09.29.10.49.58; author tnn; state Exp; branches; next 1.2; commitid ztbPCqeqk1L5qvXG; 1.2 date 2025.11.15.12.17.12; author ryoon; state dead; branches; next 1.1; commitid SHodt4IOcVSG7EiG; 1.1 date 2025.08.11.18.06.32; author pho; state Exp; branches; next ; commitid bmUAUprLlDrX8l6G; desc @@ 1.3 log @openjdk21: reduce diffs w/ openjdk25, add Darwin and Linux targets @ text @$NetBSD$ Work around SIGBUS on macOS --- src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp.orig 2026-09-29 10:45:05.907015432 +0000 +++ src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp @@@@ -472,6 +472,9 @@@@ static inline void atomic_copy64(const v extern "C" { int SpinPause() { +#if defined(__APPLE__) + return 0; // XXX stub broken; See JDK-8278241, JDK-8321371 +#endif using spin_wait_func_ptr_t = void (*)(); spin_wait_func_ptr_t func = CAST_TO_FN_PTR(spin_wait_func_ptr_t, StubRoutines::aarch64::spin_wait()); assert(func != nullptr, "StubRoutines::aarch64::spin_wait must not be null."); @ 1.2 log @lang/openjdk21: Update to 1.21.0.9.10 Changelog: Updated BSD port of JDK 21 Additional features include: Update to 21.0.8 GA @ text @d1 1 a1 1 $NetBSD: patch-src_hotspot_os__cpu_bsd__aarch64_os__bsd__aarch64.cpp,v 1.1 2025/08/11 18:06:32 pho Exp $ d3 1 a3 2 Workaround for the Hotspot VM dying on Apple Silicon chips. See the patch to threadWXSetters.inline.hpp for details. d5 1 a5 1 --- src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp.orig 2025-04-19 18:18:28.000000000 +0000 d7 1 a7 11 @@@@ -694,6 +694,11 @@@@ bool PosixSignals::pd_hotspot_signal_han assert(sig == info->si_signo, "bad siginfo"); } */ + + // Enable WXWrite: this function is called by the signal handler at arbitrary + // point of execution. + ThreadWXEnable wx(WXWrite, thread); + // decide if this trap can be handled by a stub address stub = nullptr; d9 8 @ 1.1 log @lang/openjdk21: Workaround for the VM dying on Apple Silicon chips See the patch for threadWXSetters.inline.hpp for details. I rebuilt the bootkit for aarch64 with new patches applied. This may cause some performance regression on Cortex series, but as I stated in the patch comment, relying on implementation details of a particular chip is fundamentally unsound, and that's why it didn't work on Apple Silicon in the first place. But since the upstream has stated they are knowingly doing this, the chance of these patches getting accepted is slim, if not zero. @ text @d1 1 a1 1 $NetBSD$ @