diff options
author | 2022-08-08 09:11:49 +0000 | |
---|---|---|
committer | 2022-08-12 06:18:41 +0000 | |
commit | 889403b999b236c055df6e64019dcca8622322fc (patch) | |
tree | 9c2161d5104fb4f02223ad286dcc9966381267be /openjdkjvmti/deopt_manager.cc | |
parent | aac790f8ffe107c24f2487e93ab6f5b5598c4419 (diff) |
Wait for JIT threads to be created in ASAN builds
A race between pthread_create and dlopen could cause deadlock in ASAN
builds with older glibc versions. The pthread_create sanitizer
interceptor uses dl_iterate_phdr with a callback that uses __tls__addr.
__tls_addr could wait on dl_load_lock when there is a dlopen in progress
on other thread in older versions of glibc. dl_iterate_phdr already
holds this lock which could cause a deadlock. As a workaround for this
issue we wait for jit threads creation to finish before loading the
system library (which could dlopen) to prevent this race.
Bug: 238730394
Test: art/test.py
Change-Id: Ic7f71e4a3eaab847c878c2a08c6bcf25b6a03a3d
Diffstat (limited to 'openjdkjvmti/deopt_manager.cc')
0 files changed, 0 insertions, 0 deletions