> "As a normal part of the just-in-time compile and execute cycle, processes running on macOS may access memory in protected memory regions." I'm just a lowly JavaScript/TypeScript/PHP programmer, but what is the Very Good Reason that Java trying to access other processes' memory?
I don’t think the article claims that a Java process tries to access some other process’s memory. In a typical modern operating system, a memory page can be non-writable and non-executable, writable and non-executable, or non-writable and executable, but not simultaneously writable AND executable. If you generate executable code at runtime, then you need write access to a page to write the executable code into that p…
macOS 14.4 causes JVM crashes
31–40 of 160 posts
Re: macOS 14.4 causes JVM crashes
#32Earlier quoted context omitted.
This is what I do when my job forced me to use a mac. I think the only thing I installed on the mac outside of it was Firefox. Worked great for years before I changed jobs that let me bring my own hardware finally.
What is your preferred hardware and flavor of Linux for this? I'm trying to do the same
Re: macOS 14.4 causes JVM crashes
#33Earlier quoted context omitted.
The reasons are literally spelled out in the following paragraphs.
I’m asking because the reasons seem dumb to me, which is why I’m asking people smarter than I am about low-level memory management if they’re legitimate.
Re: macOS 14.4 causes JVM crashes
#34Re: macOS 14.4 causes JVM crashes
#35An issue introduced by macOS 14.4, which causes Java process to terminate unexpectedly, is affecting all Java versions from Java 8 to the early access builds of JDK 22 If this affects so many versions of Java and nobody notices, is anyone even using Java on macOS?
Re: macOS 14.4 causes JVM crashes
#36That said I’m curious what the exact scenario that leads to this is, I’m assuming it’s not common as you would expect it to have come up during betas and pre -release seeds.
Re: macOS 14.4 causes JVM crashes
#37Well, that’s why Apple forbids use of private APIs in the App Store apps. If you built all your tech stack on the foundation of some peculiar nondocumented platform’s behavior, don’t be surprised when this stack breaks.
These behaviours have been historically well documented.
Re: macOS 14.4 causes JVM crashes
#38> "As a normal part of the just-in-time compile and execute cycle, processes running on macOS may access memory in protected memory regions." I'm just a lowly JavaScript/TypeScript/PHP programmer, but what is the Very Good Reason that Java trying to access other processes' memory?
A fairly common idiom is to use memory protection to provide zero cost access checks, as you can generally catch the signals produced by most memory faults, and then work out where things went wrong and convert the memory access error into a catchable exception, or to lazily construct data structures or code.
So you want the trap, but the trap itself can be handled. It sounds like there’s been a semantic change when the trap occurs for execution of an address or an access to an executable page.
There are also a bunch of poorly documented Mac APIs to inform the memory manager and linker about JIT regions and I wonder if it’s related to those. It really depends on exactly what oracle’s jvm is trying to do, and what the subsequent cause of the fault is.
Certainly it’s a less than optimal failure though :-/
Re: macOS 14.4 causes JVM crashes
#39Well, that’s why Apple forbids use of private APIs in the App Store apps. If you built all your tech stack on the foundation of some peculiar nondocumented platform’s behavior, don’t be surprised when this stack breaks.
This is not an API. It's the handling of writes to memory the process has protected. In the past this would generate a signal the process could handle and recover from. Now it generates a sigkill which is uncatchable / unrecoverable from. These behaviours have been historically well documented.
Re: macOS 14.4 causes JVM crashes
#40Earlier quoted context omitted.
This is not an API. It's the handling of writes to memory the process has protected. In the past this would generate a signal the process could handle and recover from. Now it generates a sigkill which is uncatchable / unrecoverable from. These behaviours have been historically well documented.
All system idiosyncrasies are APIs in the long run ;)