RFR: Fix object initialization in C2

Roman Kennke rkennke at redhat.com
Tue Dec 6 21:29:28 UTC 2016


As discussed in previous thread, we overshoot object initialization by
one word in C2 compiled allocation code. Besides generating one extra
store, I believe it's very dangerous: an object allocated at region end
would write to one word beyond, either thrashing the brooks ptr of the
next regions first object, or causing a SEGV at end of heap. I'm
actually surprised it hasn't happened yet ;-)

The fix is relatively simple: keep around the true object size, and
pass that to initialize_object() instead of the obj-size + brooksptr-
size that we calculated.

http://cr.openjdk.java.net/~rkennke/obj-init/webrev.00/

Ok?

Roman


More information about the shenandoah-dev mailing list