Date: Sun, 17 Aug 2025 14:02:37 +0000 From: bugzilla-noreply@freebsd.org To: java@FreeBSD.org Subject: [Bug 265284] java/openjdk11: wont run or build running on VMWare on M1 Mac Mini (aarch64) Message-ID: <bug-265284-8522-DndGQVHbyI@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-265284-8522@https.bugs.freebsd.org/bugzilla/> References: <bug-265284-8522@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265284 PHO <pho@cielonegro.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pho@cielonegro.org --- Comment #10 from PHO <pho@cielonegro.org> --- Hello. I am a pkgsrc developer from NetBSD.org. We had suffered from the same issue on NetBSD and have recently found out the cause. The problem was not about W^X but was about cache coherency. pkgsrc now has a series of patches to work around the problem. Maybe you FreeBSD folks are interested in incorporating them? The patches are here: https://github.com/NetBSD/pkgsrc/tree/63c121a0079d1e0eac81acb3cd557ba68f4ebe8b/lang/openjdk21/patches To fix it apply these 3 patches: * patch-src_hotspot_share_runtime_threadWXSetters.inline.hpp * patch-src_hotspot_cpu_aarch64_jniFastGetField__aarch64.cpp * patch-src_hotspot_os__cpu_bsd__aarch64_os__bsd__aarch64.cpp And also replace every occurence of > MACOS_AARCH64_ONLY(ThreadWXEnable with > AARCH64_ONLY(ThreadWXEnable in any files under "src/hotspot". Any files, not just .[ch]pp. The patch file for threadWXSetters.inline.hpp contains detailed explanation of what the actual problem is and how one can fix it. I initially considered reporting this to OpenJDK devs but it turned out they really don't want any feedback from outsiders. They don't even allow random people on the Internet to file a bug ticket!! So I decided to just inform you about the fix and forget about the upstream. -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-265284-8522-DndGQVHbyI>
