Skip to content

Fix the fadvise handling of large offsets on FreeBSD.#1318

Merged
sunfishcode merged 3 commits intomainfrom
sunfishcode/freebsd-fadvise
Feb 11, 2025
Merged

Fix the fadvise handling of large offsets on FreeBSD.#1318
sunfishcode merged 3 commits intomainfrom
sunfishcode/freebsd-fadvise

Conversation

@sunfishcode
Copy link
Copy Markdown
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
@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