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 error returned from readdir_r when isolation is enabled, and uses of raw_os_error #3995

Merged
merged 3 commits into from
Oct 26, 2024

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Oct 26, 2024

In #3779 @oli-obk noticed that our readdir_r is buggy -- it shouldn't ever set errno, but the "isolation enabled" path used the shared helper that sets errno.

So this PR fixes that. I think that is the only part of #3779 that intentionally changes behavior.

I also noticed some uses of raw_os_error, which is buggy since it returns host error codes that we can't just use for the target.

@RalfJung RalfJung changed the title fix error returned from readdir_r when isolation is enabled fix error returned from readdir_r when isolation is enabled, and uses of raw_os_error Oct 26, 2024
src/shims/unix/fs.rs Outdated Show resolved Hide resolved
@RalfJung
Copy link
Member Author

RalfJung commented Oct 26, 2024 via email

@oli-obk oli-obk added this pull request to the merge queue Oct 26, 2024
Merged via the queue into rust-lang:master with commit d4e917f Oct 26, 2024
6 checks passed
@RalfJung RalfJung deleted the readdir_r branch October 27, 2024 18:30
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.

3 participants