-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Wasm] Fix computation of initial HT capacity.
Up to now, we potentially stored a value larger than a `uint32_t` in `initial_capacity` leading to undefined behavior. We now properly cast the value to a `uint64_t` and check if it fits into a `uint32_t`, otherwise we return the maximal value of `uint32_t`. Furthermore, we put the repetitive computation of the initial hash table capacity into its own function.
- Loading branch information
Showing
2 changed files
with
22 additions
and
32 deletions.
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