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

guard the WorldPointer against UB #83

Merged
merged 1 commit into from
Nov 6, 2023

Conversation

jrobsonchase
Copy link
Contributor

Resolves #82

Prevents WorldPointers from seeing an invalid *mut World by wrapping it in an Option that gets taken when the original WorldPointerGuard gets dropped.

Also adding a couple of blocking variants of the existing read/write methods since I'm not in love with the current panic-rather-than-block semantics. I would probably advocate for inverting them and block by default, but I didn't want to shake things up too much.

@makspll makspll merged commit eb691a2 into makspll:main Nov 6, 2023
11 of 13 checks passed
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.

WorldPointer is unsound
2 participants