Revert "Revert "Use try lock to fix class resolution race""
Fix possible deadlock in EnsureResolved caused by interaction with GC. Since we were sleeping while holding the mutator lock, it could block thread suspension. This would deadlock if the thread that had locked h_class is already suspended since we would spin forever and not make progress. Bug: 27417671 Bug: 30500547 Test: test-art-host ART_TEST_GC_STRESS=true This reverts commit 69bf969c. (cherry picked from commit 4b0ef1c9) Change-Id: If5766c2c3c8a130cbb83735cdb9970038570dafd
Loading
Please sign in to comment