# HG changeset patch # User poonam # Date 1401283565 25200 # Node ID 09619752c16dd570115af4dca112c5f3b5c05253 # Parent 6a0ad297791984e3d0794c3a87b97edc248d3751 8043086: Hotspot is expected to report OOM which is occurred String.intern(), but crashes in JDK8u5 Summary: In case of allocation failure, restore the value of _chunk in Arena Reviewed-by: dholmes, dcubed diff -r 6a0ad2977919 -r 09619752c16d src/share/vm/memory/allocation.cpp --- a/src/share/vm/memory/allocation.cpp Tue May 20 10:24:30 2014 +0200 +++ b/src/share/vm/memory/allocation.cpp Wed May 28 06:26:05 2014 -0700 @@ -561,6 +561,7 @@ _chunk = new (alloc_failmode, len) Chunk(len); if (_chunk == NULL) { + _chunk = k; // restore the previous value of _chunk return NULL; } if (k) k->set_next(_chunk); // Append new chunk to end of linked list