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

Eliminate potential panic in sys_fill_exact #334

Merged
merged 1 commit into from Jan 27, 2023
Merged

Conversation

newpavlov
Copy link
Member

In practice we should never get number of read bytes bigger than buffer length, but compiler can not prove it, so it generates a panic branch for it. This change does not help with performance (compiler still generates branch on most targets), but makes resulting binary a bit smaller.

@josephlr josephlr merged commit 9ceb7e5 into master Jan 27, 2023
@josephlr josephlr deleted the tweak_sys_fill_exact branch January 27, 2023 23:30
@newpavlov newpavlov mentioned this pull request Apr 2, 2023
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.

None yet

2 participants