RAMs now then then suffer from bit errors. That is, a bit on the heap just changes from 0 to 1 or the other way round. It happens very seldom, but the more memory an application uses and the longer the application runs the more likely it is that it will be affected by such a bit error.
Does the JVM have any means to detect such errors?
At the moment I assume that if a bit error hits a value field of a java object which is allocated on the heap, the value just changes. I have no idea what happens if a bit error will hit a reference field, but bets are that the jvm will just crash once the faulty reference is followed. Bit erros inside the jvm own structures most likely result in “undefined behavior” my favorite term from C and C++ standards.
I know such errors are extremely rare, but I’m curious if someone knows more about this topic, and can shed some light on it