changeset 49473:bef5683e363d

8199886: gc/cslocker/TestCSLocker.java crashes Reviewed-by: rkennke, kbarrett
author pliden
date Tue, 20 Mar 2018 22:22:02 +0100
parents 74db2b7cec75
children 1708db7f94c6
files src/hotspot/share/gc/shared/collectedHeap.cpp
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/hotspot/share/gc/shared/collectedHeap.cpp	Tue Mar 20 10:23:14 2018 -0700
+++ b/src/hotspot/share/gc/shared/collectedHeap.cpp	Tue Mar 20 22:22:02 2018 +0100
@@ -587,8 +587,9 @@
 }
 
 oop CollectedHeap::pin_object(JavaThread* thread, oop o) {
+  Handle handle(thread, o);
   GCLocker::lock_critical(thread);
-  return o;
+  return handle();
 }
 
 void CollectedHeap::unpin_object(JavaThread* thread, oop o) {