Request for review: 7046490 - Preallocated OOME objects should obey Throwable stack trace protocol

David Holmes David.Holmes at
Wed Jul 6 22:25:39 PDT 2011

This is a simple fix in the VM to honour the Throwable immutability 
protocol that was defined for Java 7. Pre-allocated Throwable instances 
are normally immutable, but that is not the case for a group of 
pre-allocated OutOfMemoryError instances. To conform to the protocol, 
when we set the backtrace (VM representation of the stackTrace) we have 
to set the stackTrace field to the sentinel value stored in the static 
Throwable.UNASSIGNED_STACK field.

With this fix in place the workaround in, under 7045138, 
can be backed out.


More information about the hotspot-runtime-dev mailing list