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

Return MAP_FAILED when mmap fails #3219

Merged
merged 1 commit into from Dec 10, 2023
Merged

Conversation

saethlin
Copy link
Member

@saethlin saethlin commented Dec 10, 2023

I don't properly remember why we ended up with a hodgepodge of return values, but #3218 correctly points out that we are supposed to return MAP_FAILED. This should fix that return value and also add sufficient tests to prevent making a similar mistake.

@saethlin saethlin linked an issue Dec 10, 2023 that may be closed by this pull request
@saethlin saethlin force-pushed the map-failed branch 4 times, most recently from 24ffa00 to 2ff7cfa Compare December 10, 2023 18:48
@saethlin saethlin marked this pull request as ready for review December 10, 2023 18:49
@RalfJung
Copy link
Member

Thanks, yes this makes a lot more sense. :)
@bors r+

@bors
Copy link
Collaborator

bors commented Dec 10, 2023

📌 Commit 22fd2a6 has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Collaborator

bors commented Dec 10, 2023

⌛ Testing commit 22fd2a6 with merge 02d5495...

@bors
Copy link
Collaborator

bors commented Dec 10, 2023

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing 02d5495 to master...

@bors bors merged commit 02d5495 into rust-lang:master Dec 10, 2023
8 checks passed
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.

mmap failure returning 0x00 instead of MAP_FAILED
3 participants