# HG changeset patch # User poonam # Date 1401283565 25200 # Node ID 82b56982e1af0afd8430ca454260b72269d568d2 # Parent ad80eed312fc86bee844e175ac9ec2a80e57cbf5 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 ad80eed312fc -r 82b56982e1af hotspot/src/share/vm/memory/allocation.cpp --- a/hotspot/src/share/vm/memory/allocation.cpp Tue May 27 21:58:23 2014 -0700 +++ b/hotspot/src/share/vm/memory/allocation.cpp Wed May 28 06:26:05 2014 -0700 @@ -563,6 +563,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