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 the fadvise handling of large offsets on FreeBSD. #1318

Merged
merged 3 commits into from
Feb 11, 2025

Conversation

sunfishcode
Copy link
Member

On FreeBSD, when a large u64 converts to a negative offset, we add some special-case behavior to hide the fact that this conversion is happening. Clarify the comments, update the code to do a proper no-op in the case of a negative offset, and use the correct length in the case of an overflowing offset+length.

On FreeBSD, when a large `u64` converts to a negative offset, we add
some special-case behavior to hide the fact that this conversion is
happening. Clarify the comments, update the code to do a proper no-op
in the case of a negative offset, and use the correct length in the
case of an overflowing offset+length.
@sunfishcode sunfishcode force-pushed the sunfishcode/freebsd-fadvise branch from bbb742a to 0fb7cdd Compare February 9, 2025 01:12
@sunfishcode sunfishcode merged commit c16dcc7 into main Feb 11, 2025
45 checks passed
@sunfishcode sunfishcode deleted the sunfishcode/freebsd-fadvise branch February 11, 2025 05:35
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.

1 participant