dotnet / jitutils

MIT License
150 stars 60 forks source link

Possible deadlock in Utility::ExecuteProcess() #344

Open BruceForstall opened 2 years ago

BruceForstall commented 2 years ago

https://github.com/dotnet/jitutils/blob/fdf42eaa08fad997c56d8da50f4300a6c4353b12/src/util/util.cs#L239-L240

According to the documentation, calling process.StandardOutput.ReadToEnd() followed by process.StandardError.ReadToEnd() can lead to deadlock.

erozenfeld commented 2 years ago

I fixed a similar issue in PMIDriver.cs in https://github.com/dotnet/jitutils/pull/252/ .