-
Bug
-
Resolution: Fixed
-
P4
-
14
-
b26
The changes in JDK-8233702 added a clamp() function to clamp a value between given min and max, with the assert checking whether min <= max.
Attempting to use this method in
hashtable.cpp:
template <MEMFLAGS F> BasicHashtableEntry<F>* BasicHashtable<F>::new_entry(unsigned int hashValue) {
64: int block_size = MIN2(512, MAX2((int)_table_size / 2, (int)_number_of_entries));
caused the assert to fail which indicates a potential issue with the calculation, i.e. unexpected return values, and so unexpected size of the hash table
Please look at the method/calculation and if the clamp() method should be used, and if so use it after fixing the code. Otherwise it would be nice to add an explanation why the method is not used/why the code is as is.
Otherwise just close out this issue.
Attempting to use this method in
hashtable.cpp:
template <MEMFLAGS F> BasicHashtableEntry<F>* BasicHashtable<F>::new_entry(unsigned int hashValue) {
64: int block_size = MIN2(512, MAX2((int)_table_size / 2, (int)_number_of_entries));
caused the assert to fail which indicates a potential issue with the calculation, i.e. unexpected return values, and so unexpected size of the hash table
Please look at the method/calculation and if the clamp() method should be used, and if so use it after fixing the code. Otherwise it would be nice to add an explanation why the method is not used/why the code is as is.
Otherwise just close out this issue.
- relates to
-
JDK-8233702 Introduce helper function to clamp value to range
- Resolved