[Bug 265284] java/openjdk11: wont run or build running on VMWare on M1 Mac Mini (aarch64)
Date: Mon, 18 Jul 2022 05:11:59 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265284 --- Comment #3 from Miguel Arroz <arroz@me.com> --- I may have a theory that explains this. From what I could understand, Apple Silicon chips enforce W^X at the hardware level, and it's not optional. openjdk on FreeBSD requires allowing W^X, even using -Xint (which disables JIT). This means the CPU will prevent openjdk from using W^X even if FreeBSD assumes it's going to work. If I set kern.elf64.allow_wx to 0, I get the error, already reported in #256477: > Error occurred during initialization of VM > Could not reserve enough space in CodeCache (2496K) When I set it to 1, I get the error I originally reported. With LLDB, I can see it eventually crashes with SIGSEGV, which supports this theory. This would also explain #260872, which seems similar to this bug but in openjdk8. -- You are receiving this mail because: You are the assignee for the bug.