Review/Comment request (S) 8027252: Crash in interpreter because get_unsigned_2_byte_index_at_bcp reads 4 bytes
John Rose
john.r.rose at oracle.com
Fri Oct 25 16:17:01 PDT 2013
On Oct 25, 2013, at 8:55 AM, Mikael Gerdin <mikael.gerdin at oracle.com> wrote:
> It appears to have
> surfaced after we've reduced the unnecessary alignment "cushions" for
> metaspace together with the fact that we are now always able to use the very
> last bit of a VirtualSpace (in Metaspace).
This sort of bug usually comes with a long line of siblings, each subsequent one 50% of the probability of the previous.
So it's usually a mistake to use every last byte up to the end of a memory region, unless you are looking for trouble (electric fence, etc.).
If it's gone away, I strongly suggest putting *back* a cache line or two worth of explicit padding at the end of every region that precedes unmapped memory. With a comment saying "don't try to optimize this".
There are literally hundreds of better ways to buy back a byte or two than using the end of a memory region.
I'm not discouraging you to fix those particular problems in the interpreter, but I am strongly disputing the wisdom of running all the way up to the edge of the page.
— John
More information about the hotspot-dev
mailing list