Skip to content

Comments

Remove HasStableHash requirement from NSSet and NSDictionary#626

Merged
madsmtm merged 2 commits intomasterfrom
no-stable-hash
Jun 4, 2024
Merged

Remove HasStableHash requirement from NSSet and NSDictionary#626
madsmtm merged 2 commits intomasterfrom
no-stable-hash

Conversation

@madsmtm
Copy link
Owner

@madsmtm madsmtm commented Jun 4, 2024

This was added in an abundance of caution in #505 to fix #337, but prevents real-world usage of these types, and isn't actually needed for soundness (the documentation mentions the collection being "corrupt" if the hash is changed, but that's not the same as it being UB).

This is checked with a fuzzing test (first commit) that I've run under AFL++ for ~4 hours with 6 parallell processes.

Fixes #507 (as it's no longer relevant).

Part of #563.

madsmtm added 2 commits June 4, 2024 22:14
This was added in an abundance of caution in #505 to fix #337, but
prevents real-world usage of these types, and isn't actually needed for
soundness (the documentation mentions the collection being "corrupt" if
the hash is changed, but that's not the same as it being UB).
@madsmtm madsmtm merged commit a820fb6 into master Jun 4, 2024
@madsmtm madsmtm deleted the no-stable-hash branch June 4, 2024 20:34
@madsmtm madsmtm added enhancement New feature or request A-framework Affects the framework crates and the translator for them labels Jun 12, 2024
madsmtm added a commit that referenced this pull request Jun 20, 2024
This is no longer useful since a820fb6 / #626.
madsmtm added a commit that referenced this pull request Sep 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-framework Affects the framework crates and the translator for them enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Disallow mutable generics in hashing collections Safety of storing mutable objects in collections?

1 participant