summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.cc
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2016-01-07 15:14:19 -0800
committerMathieu Chartier <mathieuc@google.com>2016-01-08 15:46:52 -0800
commit4d87df607a0b86cdf4b2c04f61d72a60d8975ce0 (patch)
tree922e882c15633e6c700091c99864868d69822d7d /compiler/optimizing/graph_visualizer.cc
parent97f2ca08c3d9a2b1694419aea07cd64f477c0af2 (diff)
Improve handling of daemon threads after runtime shutdown
The main issue comes from the fact that user daemon threads are allowed to continue running after the runtime has shutdown. They may still have a JNI env pointer. To prevent crashing if they call into the env, we replace the function pointers with functions that sleep forever. The other issue is that user daemon threads that are blocked in an ART condition variable may get woken up by another user daemon inside of Monitor::Notify or by a spurious wakeup (i.e. SIGQUIT). To deal with this issue, we check the JNI env for shutdown runtime when we are woken up from a condition variable wait. This check fixes test 132 with --host --gdb --interpreter. Previously this test crashed since dlclose was somehow causing a spurious futex wakeup. TODO: Investigate adding a unit test. Bug: 18577101 Change-Id: I479b38968ee9fbc4ee4b252ee2528787279972cc
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions