View Issue Details

IDProjectCategoryView StatusLast Update
0000012Kohi EngineBugspublic2026-10-19 18:01
Reportertravisvroman Assigned Totravisvroman  
PrioritynormalSeverityminorReproducibilityhave not tried
Status assignedResolutionopen 
Summary0000012: [BUG] hashtable does not detect hash collisions
Description

Ported over from GitHub issues: https://github.com/travisvroman/kohi/issues/248

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.

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.

Steps To Reproduce

To Reproduce

  1. 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).
  2. The test should show that the old entry is silently dropped.
Additional Information

See proposed PR here: https://github.com/travisvroman/kohi/pull/284

Tagsbug
Revision

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2026-10-19 18:01 travisvroman New Issue
2026-10-19 18:01 travisvroman Status new => assigned
2026-10-19 18:01 travisvroman Assigned To => travisvroman
2026-10-19 18:01 travisvroman Tag Attached: bug