[Bug 265284] java/openjdk11: wont run or build running on VMWare on M1 Mac Mini (aarch64)
| Newsgroups | gmane.os.freebsd.devel.java |
|---|---|
| Message-ID | <[email protected]/bugzilla/> |
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265284 PHO <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #10 from PHO <[email protected]> --- 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.