Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
windows: Fix a race condition when removing file map handles.
We hold a lock on the handleMap while we remove an addr/handle pair from it, but we need to also include the UnampViewOfFile in the map. There was a window of opportunity for the OS to re-use the addr for a new map, and if the goroutine which mapped that addr also unmapped it before we tried to remove our handle from handleMap, we would find that our handle was missing from handleMap.
- Loading branch information