Weak hash-tables are not gc-safe.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
High
|
Unassigned |
Bug Description
(defvar *h* (make-hash-table :test #'eq :weakness :key))
(sb-thread:
(loop (setf (gethash (cons 1 2) *h*) 10))
GC invariant lost, file "gc-common.c", line 1794
cull_weak_
gc_assert(value != empty_symbol);
Bisected to
https:/
commit 4d328c3324e10e2
Author: Douglas Katzman <email address hidden>
Date: Sun Jan 28 14:25:55 2024 -0500
Implement a hash-table chain correctness checker in C
A later commit will enable the assertions. This piece is separated out
since there is a small required change to PUTHASH which is trivial
but interesting, and should not get lost in the noise.
Changed in sbcl: | |
status: | Triaged → Fix Committed |
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
could not repro on x86-64 but could on arm64. relaxed- memory- order is affecting it, I need to find where