Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix two possible fs_scandir segfaults #605

Merged
merged 3 commits into from
Jun 2, 2022

Conversation

squeek502
Copy link
Member

See commit messages and #603 for more info.

The added test is unrelated to the segfaults, but it's worth making sure that the async version of fs_scandir works, which we didn't have a test for previously.

If `uv_fs_scandir` returns an error, we don't want to cleanup the req since it will be cleaned up by its __gc function. Before this change, this would lead to a segfault since req->data (which would get set to NULL) would attempt to be used in `luv_fs_gc`.
@zhaozg zhaozg merged commit 9f80386 into luvit:master Jun 2, 2022
squeek502 added a commit to squeek502/luv that referenced this pull request Jun 7, 2022
Follow up to luvit#605 and luvit#603. The sync error test added here was the actual cause of the segfaults in normal usage.
squeek502 added a commit that referenced this pull request Jun 8, 2022
Follow up to #605 and #603. The sync error test added here was the actual cause of the segfaults in normal usage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants