diff options
author | Alex Light <allight@google.com> | 2017-10-30 15:33:58 -0700 |
---|---|---|
committer | Alex Light <allight@google.com> | 2017-10-30 16:16:41 -0700 |
commit | 7585b91bfc77b8e4b821ccfa716fa86e46455275 (patch) | |
tree | b37517925ac9ab701cbae7f446dc8bb624ddd492 /compiler/optimizing/graph_visualizer.cc | |
parent | 0d2b2ad6cd9ca650d7a3f85a42afaf518cbfa4e0 (diff) |
Prevent races with GC when transferring objects between threads
We could have races with the GC when JVMTI code transfers a local
reference from one thread to another. This race would happen if a GC
was currently underway causing an unmoved reference to be transferred
to a thread that has already fixed up all of its references. This
meant that the receiving thread would now have a reference belonging
to the from-space on its stack.
This could cause memory errors and CHECK failures.
To fix this we make sure to run all checkpoints where local references
might be transferred in a GC-critical-section.
We also needed to fix a too-strict check in the method verifier where
we were incorrectly asserting that suspension be allowable when in
fact it was not necessary in all cases.
Test: ./test.py --host -j50
Bug: 67838964
Change-Id: Ib9166cc233d3c1b488864c0aff33246a3f99e436
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions