Fix a mutex abandon case with WaitHandle.WaitAll in the PAL (#25452)
authorKoundinya Veluri <kouvel@users.noreply.github.com>
Sat, 29 Jun 2019 07:27:20 +0000 (00:27 -0700)
committerGitHub <noreply@github.com>
Sat, 29 Jun 2019 07:27:20 +0000 (00:27 -0700)
commite0a9df573c1d208dc70b92cc7fcb7e487614c4f1
tree63401a303adeb7408de30ac68b8634ef24ab2838
parent5ce8eaf4d4acad83f8e38095651ff765d339aab2
Fix a mutex abandon case with WaitHandle.WaitAll in the PAL (#25452)

Fixes https://github.com/dotnet/coreclr/issues/25108
- Upon a `WaitAll` when all waits are already satisfied, the abandoned flag is overwritten with the abandoned state of the last wait object in the array
- So if the first wait object is an abandoned mutex and the second wait object is a signaled event, the `WaitAll` succeeds and does not report that anything was abandoned
- Fixed to accumulate into the flag instead of overwriting it
src/pal/src/synchmgr/wait.cpp