OSDN Git Service

Use getReferent() in enqueueSentinelReference to avoid race with GC.
authorHiroshi Yamauchi <yamauchi@google.com>
Fri, 2 Dec 2016 21:58:58 +0000 (13:58 -0800)
committerHiroshi Yamauchi <yamauchi@google.com>
Fri, 2 Dec 2016 22:32:40 +0000 (14:32 -0800)
commita8888c1b6513a6f5335e72073efc301c86467e92
tree3228f8c9146b30cecf1cf902bfef44d4ac5f0e89
parent5d0c3009fc56afdb4aeae5ee6dd98c3d1d2e7711
Use getReferent() in enqueueSentinelReference to avoid race with GC.

This is the art part.

Fix a check failure due to the direct referent access that races with
the GC reference processing for CC.

Bug: 33207594
Bug: 12687968
Test: test-art-host with and without CC.
Change-Id: I3c98066d09dd98d8fddc59b6784c75843b45338b
runtime/native/java_lang_ref_FinalizerReference.cc