summaryrefslogtreecommitdiff
path: root/compiler/optimizing/optimizing_compiler.cc
diff options
context:
space:
mode:
author Alex Light <allight@google.com> 2020-03-25 14:18:56 -0700
committer Alex Light <allight@google.com> 2020-03-30 15:53:55 +0000
commit75d2189983906b36f6952b77d6d732a74f5fbd70 (patch)
treeb61837ae1387e724e3e500d1817f8398893db03a /compiler/optimizing/optimizing_compiler.cc
parentbdf146cecefd51f9823b3f1a1e158923c278f4d7 (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 Change-Id: I38bfeb7edc58d950381bca42ff2ecec53de65ae0
Diffstat (limited to 'compiler/optimizing/optimizing_compiler.cc')
0 files changed, 0 insertions, 0 deletions