Fix race with host_dlopen_handles_
Thread 1 opens an already opened oat file.
Thread 2 dlcloses the oat file and removes it from
Thread 1 checks that it is not already in host_dlopen_handles_ and
proceeds to return the oat file. The problem now is that the BSS is
not cleared since it is the same oat file that was opened earlier.
The fix is to just hold the lock for dlopen / dlclose. This only
affects contention on host.
2 files changed