mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
IPC: Fix occasional windows crash
As far as I can tell, if a read was cancelled from a background thread, the IO operation wasn't cancelled, so the system was poking at the stack-allocated OVERLAPPED structure after it had been removed from the stack, at which point something else might be occupying that region of stack memory. I'm pretty sure Address Sanitizer should be able to catch this sort of thing so I'm surprised it didn't complain here.
This commit is contained in:
parent
84be2fea9a
commit
9b90398cf9
1 changed files with 3 additions and 0 deletions
|
|
@ -1150,7 +1150,10 @@ private:
|
|||
bool waitForIO (OverlappedEvent& over, int timeOutMilliseconds)
|
||||
{
|
||||
if (shouldStop)
|
||||
{
|
||||
CancelIo (pipeH);
|
||||
return false;
|
||||
}
|
||||
|
||||
HANDLE handles[] = { over.over.hEvent, cancelEvent };
|
||||
DWORD waitResult = WaitForMultipleObjects (2, handles, FALSE,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue