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
hashbrown is not following strict provenance #384
Comments
Should hashbrown use |
@Amanieu is there a usual cadence for syncing hashbrown changes to the standard library? Looks like the version shipped with current nightly still has the old int2ptr casts in it. |
We currently have several breaking changes on master, and I'm finishing up some new feature which will be released in hashbrown 0.14. I think the release should happen in the next week or two. |
Cool, thanks for the update!
|
hashbrown is using int-to-ptr casts in some places, instead of the strict provenance APIs:
hashbrown/src/raw/mod.rs
Line 306 in 09dc17e
hashbrown/src/raw/mod.rs
Line 326 in 09dc17e
hashbrown/src/raw/mod.rs
Line 334 in 09dc17e
(there might be more)
The cases I have found so far are all inside
if Self::IS_ZERO_SIZED_TYPE {
, so I assume these are "fake" pointers that are never dereferenced, and could be usingptr::invalid_mut
.The
fuzzy_provenance_casts
lint can be used to statically check for such casts. Currently however the strict provenance functions are still unstable.The text was updated successfully, but these errors were encountered: