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
Fix HAMT crash when function values used as map keys
The hash function returned constant 42 for all function types (fn_val,
builtin_fn, protocol_fn, etc.), causing 100% hash collision when >8
function-keyed entries promoted from ArrayMap to HashMap. The HAMT's
createTwoNode infinitely recursed (shift wraps at 30 bits) leading to
stack overflow (SIGSEGV on Linux, SIGILL on Mac).
Two fixes:
1. hash.zig: Identity hash for unhandled types using splitmix64 on the
raw NaN-boxed bits (unique per heap object)
2. collections.zig: HAMT collision nodes for full 32-bit hash collisions
(flat KV list with linear scan, matching JVM's HashCollisionNode)
This fixes spec.clj loading crash and brings cljw test from 11→83
namespaces on Linux (full parity with Mac).
0 commit comments