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

size_of_val and min_align_of_val intrinsics should be unsafe #80668

Closed
tmiasko opened this issue Jan 4, 2021 · 0 comments · Fixed by #80711
Closed

size_of_val and min_align_of_val intrinsics should be unsafe #80668

tmiasko opened this issue Jan 4, 2021 · 0 comments · Fixed by #80711
Assignees
Labels
A-intrinsics Area: Intrinsics E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@tmiasko
Copy link
Contributor

tmiasko commented Jan 4, 2021

The unsafe functions size_of_val_raw & align_of_val_raw are implemented using
size_of_val and min_align_of_val intrinsics, which are currently considered to
be safe.

The #69079 changed the API of those intrinsics to accept raw pointers instead
of references, but didn't update the safety of those intrinsics (the discussion
regarding safety can be found in aforementioned PR).

Function describing safety of intrinsics that needs to be updated (this will
also need to be accompanied by changes in the standard library):

| sym::size_of_val
| sym::min_align_of_val

@oli-obk oli-obk added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Jan 4, 2021
@camelid camelid self-assigned this Jan 4, 2021
@jonas-schievink jonas-schievink added the A-intrinsics Area: Intrinsics label Jan 4, 2021
@bors bors closed this as completed in da305a2 Jan 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-intrinsics Area: Intrinsics E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants