Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/synchronizer.cpp @ 7628:f3184f32ce0b
6444286: Possible naked oop related to biased locking revocation safepoint in jni_exit()
Summary: Add missing Handle.
Reviewed-by: acorn, dholmes, dice, sspitsyn
Contributed-by: karen.kinnear@oracle.com
author | dcubed |
---|---|
date | Tue, 22 Jan 2013 05:55:04 -0800 |
parents | f34d701e952e |
children | 3ac7d10a6572 9fae07c31641 |
comparison
equal
deleted
inserted
replaced
7627:c73c3f2c5b3b | 7628:f3184f32ce0b |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
331 | 331 |
332 // NOTE: must use heavy weight monitor to handle jni monitor exit | 332 // NOTE: must use heavy weight monitor to handle jni monitor exit |
333 void ObjectSynchronizer::jni_exit(oop obj, Thread* THREAD) { | 333 void ObjectSynchronizer::jni_exit(oop obj, Thread* THREAD) { |
334 TEVENT (jni_exit) ; | 334 TEVENT (jni_exit) ; |
335 if (UseBiasedLocking) { | 335 if (UseBiasedLocking) { |
336 BiasedLocking::revoke_and_rebias(obj, false, THREAD); | 336 Handle h_obj(THREAD, obj); |
337 BiasedLocking::revoke_and_rebias(h_obj, false, THREAD); | |
338 obj = h_obj(); | |
337 } | 339 } |
338 assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); | 340 assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now"); |
339 | 341 |
340 ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj); | 342 ObjectMonitor* monitor = ObjectSynchronizer::inflate(THREAD, obj); |
341 // If this thread has locked the object, exit the monitor. Note: can't use | 343 // If this thread has locked the object, exit the monitor. Note: can't use |