review (XS) for 7002666: eclipse CDT projects crash with compressed oops

Tom Rodriguez tom.rodriguez at oracle.com
Tue Nov 30 11:48:46 PST 2010


http://cr.openjdk.java.net/~never/7002666/

7002666: eclipse CDT projects crash with compressed oops
Reviewed-by:

When emitting the code to zero a newly allocated object C2 attempts to
identify space that's already been initialized or extra space that
isn't actually part of an instance.  The logic for this should only be
executed for instances and never for arrays but the logic doesn't
explicitly test for arrays.  It's normally protected in the array case
because the klass is precise and the value of layout_helper will never
match zeroes_done since it's always negative for arrays.  In this case
the newArray is producing something that's typed as Object so the
klass input of the allocation says Object and it mistakenly assumes
the rest of the array doesn't need zeroing.  The fix is to only
execute this logic for AllocateNodes.  Tested with eclipse and with
new test case.

src/share/vm/opto/memnode.cpp
test/compiler/7002666/Test7002666.java


More information about the hotspot-compiler-dev mailing list