-
-
Notifications
You must be signed in to change notification settings - Fork 90
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 another segfault in the partition deletion logic #1809
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix looks correct; a unit test might have been nice but also annoying to write this since ultimately requires a system error to trigger and results in a segfault which isn't really testable so our testbed testing should suffice.
I'd like to see a unit test too. Perhaps we need to build out some testing infrastructure to be able to fake out the |
I think it shouldn't actually be that hard, we can just mock the filesystem, but we'll have to delay that until after the release. |
The erase handler in the index failed to check that the chunk that is returned from the filesystem is actually valid. In case it wasn't, the subsequent deref lead to a segfault.
The posix filesystem used to convert mmap failures to invalid chunks. This seems like a bad idea.
e58b65d
to
9909105
Compare
📔 Description
This time the index forgot to check the validity of a requested partition chunk. The relevant error handling below was also slightly modified to log the cause of failed
mmap(2)
s and prevent similar problems in the future.📝 Checklist
🎯 Review Instructions
By commit.