commit | 2743d756c5cdf1065740cc47d8b3af774157de00 | [log] [tgz] |
---|---|---|
author | Alex Light <allight@google.com> | Tue Dec 05 10:36:12 2017 -0800 |
committer | Alex Light <allight@google.com> | Tue Dec 05 21:01:34 2017 +0000 |
tree | f17fc5085f4df0c010351a7763b6453a1416ad09 | |
parent | f5df935f1ce34462aff7f93d40adcc5f026a6b11 [diff] |
Fix races in trace_helper.cc We had an unfortunate race when stopping tracing with the trace_helper test code. This could lead to calling JNI methods with null or deleted global references. We fix this by using a JVMTI Raw Monitor and copying the global into a local ref. This allows us to safely disable tracing at any time from any thread. Test: ./test.py --host -j50 Bug: 69657830 Change-Id: I2f5daadddbde0cbd2f8453affb3871774837c47e