summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_visualizer.cc
diff options
context:
space:
mode:
authorAlex Light <allight@google.com>2020-03-25 14:18:56 -0700
committerAlex Light <allight@google.com>2020-03-31 15:30:32 +0000
commitda4fb26918c99f0ff8ffe78f0d4aca0a9c8668eb (patch)
tree3485fd5d3e08a451119a3d5e5c7d70d869b12634 /compiler/optimizing/graph_visualizer.cc
parent3ca922bf59313056cba1851726aa1131d17b0228 (diff)
Fix thread shutdown race in adbconnection
In cases where the runtime shuts down cleanly (i.e. returns from the `int main(String[])` method) the adbconnection poll thread could race runtime shutdown and potentially crash. Since clean runtime shutdown is rare in android this issue was not often observed. To fix this we moved the shutdown of the adbconnection threads to earlier, when the runtime is still able to process thread-detach and join the poll thread. This ensures that (1) the shutdown process will wait for all thread operations before starting to tear down the thread system and (2) we won't leave any orphan pthreads around. Bug: 151801489 Bug: 149494762 Test: On a blueline: $ dalvikvm64 -cp /data/local/tmp/classes.dex -XjdwpProvider:adbconnection Main Merged-In: I38bfeb7edc58d950381bca42ff2ecec53de65ae0 Change-Id: I38bfeb7edc58d950381bca42ff2ecec53de65ae0 (cherry picked from commit 75d2189983906b36f6952b77d6d732a74f5fbd70)
Diffstat (limited to 'compiler/optimizing/graph_visualizer.cc')
0 files changed, 0 insertions, 0 deletions