-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix use after free bug around
StringInterner::clone()
(#10)
* Add a test which may fail for use after free bug #9 * Implement `Clone` manually for `StringInterner` New `clone()` implementation recreates `HashMap` to update key `InternalStrRef`s with pointer to newly cloned strings. `#[derive(Clone)]` requires `S: Clone` automatically, and the new `Clone` implementation does not require it explicitly. However, `S: Symbol` trait bound indirectly requires `S: Clone`, so the restriction for `S` is actually not changed. Fixes #9.
- Loading branch information
Showing
2 changed files
with
63 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters