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

Remove all non-local unsafety. #7

Merged
merged 1 commit into from
Oct 31, 2024
Merged

Remove all non-local unsafety. #7

merged 1 commit into from
Oct 31, 2024

Conversation

Alexhuszagh
Copy link
Owner

This patches a lot of the wrappers in AsciiStr being marked as safe but not being safe except within the context, using raw pointer dereferences without local bounds checks.

This is extensively documented in aldanor#37:
aldanor#37

AsciiStr has been re-written as a result, and unsafe functions marked as safe have been either converted to safe variants where the compiled checks can be ellided or marked as unsafe so the caller knows to upholds the safety invariants.

This patches a lot of the wrappers in `AsciiStr` being marked as safe but not being safe except within the context, using raw pointer dereferences without local bounds checks.

This is extensively documented in aldanor#37:
    aldanor#37

`AsciiStr` has been re-written as a result, and unsafe functions marked as safe have been either converted to safe variants where the compiled checks can be ellided or marked as unsafe so the caller knows to upholds the safety invariants.
@Alexhuszagh Alexhuszagh added the A-sec Related to unsoundness/security issues. label Oct 31, 2024
@Alexhuszagh Alexhuszagh added this to the 0.2.2 milestone Oct 31, 2024
@Alexhuszagh Alexhuszagh self-assigned this Oct 31, 2024
@Alexhuszagh Alexhuszagh linked an issue Oct 31, 2024 that may be closed by this pull request
@Alexhuszagh Alexhuszagh merged commit 57bf987 into main Oct 31, 2024
16 checks passed
@Alexhuszagh Alexhuszagh deleted the issue_2 branch October 31, 2024 04:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sec Related to unsoundness/security issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Potential unsoundnesses (not yet determined) with use of unsafe
1 participant