diff options
author | Mathieu Chartier <mathieuc@google.com> | 2014-09-12 11:18:25 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2014-09-12 13:20:52 -0700 |
commit | e928a238e5e7f7b9fd74ed460f7e7943484d96af (patch) | |
tree | ff33a33f7c2bc0d661aa9948aa81a9ee4bb1e341 /annotations/generate_annotated_java_files.py | |
parent | 8806710d7a5cd6a168f2463de21498c58f70948a (diff) |
Fix race between finalizeAllEnqueued and GC
Problem: GC uses pendingNext field for its internal references. This
causes a race where the GC can see the sentinel finalizer reference
through the internal doubly linked list and scan it before the
referent is marked, resulting in the pendingNext being part of a GC
internal reference queue. Then when we updated the pendingNext to
make a circular list it broke the list since the node never reached
the head.
The solution is to use native code so that we can use the same lock
that the GC uses when enqueing references and retry if the GC
changed the pendingNext.
Bug: 17462553
Change-Id: I0388f289a83d9b48e88129fe5b4b49ace4c5a1ca
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
0 files changed, 0 insertions, 0 deletions