6444286: Possible naked oop related to biased locking revocation safepoint in jni_exit()

Tue, 22 Jan 2013 05:55:04 -0800

author
dcubed
date
Tue, 22 Jan 2013 05:55:04 -0800
changeset 4470
f3184f32ce0b
parent 4469
c73c3f2c5b3b
child 4471
22ba8c8ce6a6

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

src/share/vm/runtime/synchronizer.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/runtime/synchronizer.cpp	Mon Jan 21 16:11:24 2013 -0500
     1.2 +++ b/src/share/vm/runtime/synchronizer.cpp	Tue Jan 22 05:55:04 2013 -0800
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -333,7 +333,9 @@
    1.11  void ObjectSynchronizer::jni_exit(oop obj, Thread* THREAD) {
    1.12    TEVENT (jni_exit) ;
    1.13    if (UseBiasedLocking) {
    1.14 -    BiasedLocking::revoke_and_rebias(obj, false, THREAD);
    1.15 +    Handle h_obj(THREAD, obj);
    1.16 +    BiasedLocking::revoke_and_rebias(h_obj, false, THREAD);
    1.17 +    obj = h_obj();
    1.18    }
    1.19    assert(!obj->mark()->has_bias_pattern(), "biases should be revoked by now");
    1.20  

mercurial