-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
opendir and friends: Fix race condition when uv_dir_t pointer doesn't…
… change between allocations (#598) If opendir/closedir was called in a loop, it was possible for the uv_dir_t pointer to always be the same between calls, and due to how we kept track of the 'closed' state of the uv_dir_t by its pointer, this could lead to freeing things twice, or freeing the memory before a readdir call, etc. Instead, we now use a wrapping luv_dir_t and normal Lua references to keep track of the state Fixes #597
- Loading branch information
Showing
3 changed files
with
46 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters