You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hash collision silently overwrites the entry for the old colliding key in hashtable.c. This can result in undefined behavior and mystifying bugs down the line.
To Reproduce
Write a test in hashtable_tests.c where two inserts cause a hash collision (e.g., inserting two separate keys into into a table with element_count 1).
The test should show that the old entry is silently dropped.
Expected behavior
At minimum, the hashtable should return a signal (e.g., error value or assert) to let the caller know that undefined behavior is happening.
The text was updated successfully, but these errors were encountered:
Describe the bug
Hash collision silently overwrites the entry for the old colliding key in hashtable.c. This can result in undefined behavior and mystifying bugs down the line.
To Reproduce
Expected behavior
At minimum, the hashtable should return a signal (e.g., error value or assert) to let the caller know that undefined behavior is happening.
The text was updated successfully, but these errors were encountered: