[Bug 265284] java/openjdk11: wont run or build running on VMWare on M1 Mac Mini (aarch64)

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 18 Jul 2022 05:11:59 UTC

--- 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

> 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

You are receiving this mail because:
You are the assignee for the bug.