News for hackers. Stuff that matters.
Re:macOS 14.4 causes JVM crashes by DuskHorizon on Saturday March 16, 2024 @04:13PM (#39729093)
All system idiosyncrasies are APIs in the long run ;)
Re:macOS 14.4 causes JVM crashes by fifteen1506 on Saturday March 16, 2024 @04:23PM (#39729177)
The change of a SIGSEGV to a SIGKILL, seriously?
Re:macOS 14.4 causes JVM crashes by DuskHorizon on Saturday March 16, 2024 @04:35PM (#39729272)
And, why not? macOS is Apple’s IP and they have all rights to do with it as they want. Buy the way, Chrome/Node.js JavaScript engine uses JIT compilation too. Are they affected?
Re:macOS 14.4 causes JVM crashes by xcv123 on Saturday March 16, 2024 @08:31PM (#39730736)
No. MacOS is UNIX Certified. This is a bug in MacOS. Breaks POSIX compliance.
Re:macOS 14.4 causes JVM crashes by DuskHorizon on Saturday March 16, 2024 @10:25PM (#39731393)
macOS breaks POSIX compliance at many levels. It’s Unix only on paper, lol.
Re:macOS 14.4 causes JVM crashes by samus on Saturday March 16, 2024 @05:55PM (#39729838)
This breaks POSIX compatibility, which is basically saying FU to how a lot of developers expect to interact with an operating system for decades now.
Re:macOS 14.4 causes JVM crashes by jandrewrogers on Saturday March 16, 2024 @08:34PM (#39730753)
It is not obvious to me that this breaks POSIX compatibility. The kernel may choose to signal a process with SIGSEGV on a memory protection violation but I can't find anything that suggests this is required.

Last I checked, macOS formally maintains POSIX certification. Linux is not POSIX compliant, so I wouldn't use Linux as the measure of what is correct behavior under POSIX.

Re:macOS 14.4 causes JVM crashes by xcv123 on Saturday March 16, 2024 @08:42PM (#39730803)
POSIX.1-2017 specification. Section titled "Memory Protection"

https://pubs.opengroup.org/onlinepubs/9699919799/functions/V...

Re:macOS 14.4 causes JVM crashes by kmiller68 on Saturday March 16, 2024 @10:26PM (#39731405)
Maybe I'm being pedantic but as far as I can tell that document doesn't say when a SIGKILL can or can't be issued. So it seems like it would be valid to issue a SIGKILL at any time the kernel wants. Obviously, that's probably not users/programmers want but it seems to technically meet the specification you list.
Re:macOS 14.4 causes JVM crashes by xcv123 on Saturday March 16, 2024 @10:50PM (#39731506)
It's not random. It is occurring in response to protected memory access. Violates the spec.
Re:macOS 14.4 causes JVM crashes by kmiller68 on Saturday March 16, 2024 @11:26PM (#39731674)
If that document said something along the lines of "a SIGKILL may only be issued when XYZ" where XYZ didn't include this case then I'd agree with you. I don't see anything in there that says when a SIGKILL should be or, more importantly, should not be generated. So it seems perfectly valid for an implementation of an OOB memory access to generate a SIGKILL and a SIGSEGV. That SIGSEGV will never be seen because the SIGKILL can't be handled and will kill the process.
Re:macOS 14.4 causes JVM crashes by xcv123 on Saturday March 16, 2024 @11:39PM (#39731748)
When kernel developers violate POSIX standards and break the JVM (and other applications not yet reported), it's a bug. Can't justify it or make excuses. Apple really fucked up here.

Linus Torvalds has a policy: "WE DO NOT BREAK USERSPACE!". You just don't release stupid changes like this in a kernel. I'm sure the team at Apple are not pleased that this bug got into production.

Re:macOS 14.4 causes JVM crashes by fifteen1506 on Monday March 18, 2024 @06:15AM (#39742103)
Specially when changing that just on the last, final, release.
Re:macOS 14.4 causes JVM crashes by DuskHorizon on Saturday March 16, 2024 @10:28PM (#39731411)
2017? Wiki says macOS are UNIX 03 certified ;)
Re:macOS 14.4 causes JVM crashes by jandrewrogers on Saturday March 16, 2024 @10:44PM (#39731481)
Ah yes that is fairly clear, thanks, I was not able to find that. A plausible interpretation is that the kernel still reserves the right to terminate the process at anytime, including immediately after a general protection fault. Still an unexpected behavior, much like the Linux OOM killer.
Re:macOS 14.4 causes JVM crashes by bitwize on Saturday March 16, 2024 @10:39PM (#39731462)
It's Apple saying "What part of 'you cannot write to this page of memory don't you understand?"