Commit 1af6a1fa authored by Elena Sayapina's avatar Elena Sayapina Committed by Andreas Gampe
Browse files

ART: Update Monitor::Wait so it releases monitor_lock_ before throwing an exception



Thread should release monitor_lock_ Mutex (which guards shared structures behind Java monitor)
in Monitor::Wait before throwing any exception. Otherwise the thread may be suspended by GC
during that time still holding the lock. This may cause deadlock during GC in case
some other thread needs to acquire the monitor_lock_. The other thread can't be suspended
by GC then waiting for exclusive lock and "thread suspend timeout" occurs.

Change-Id: Id02f45052e1cfc01e676a43434125817564d7874
Signed-off-by: default avatarElena Sayapina <elena.v.sayapina@intel.com>
parent 13f89cb9
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment