And built SBCL with with :WEAKNESS :KEY-AND-VALUE in both hash tables.
The change does not seem to break anything, the resulting hash tables have :WEAKNESS :KEY-AND-VALUE, but it does not fix the issue either: the classoids in question are still not purged from the system.
This is likely because the classoids (or references to them) are allocated in static space (at least this is how I interpret the results given to me by SEARCH-ROOTS) and therefore the classoids are not collectable by the GC, which means that simple hash table weakness is not enough to remove them.
I wondered what would break if we added weakness to the hash tables instantiated in these two places:
https:/ /github. com/sbcl/ sbcl/blob/ 8a2df46b46e3feb 201c7f19096018a 3f4b1c7d8a/ src/code/ class.lisp# L290-L292
https:/ /github. com/sbcl/ sbcl/blob/ 532b885acb3da5b f927b600f05d568 507075ae3c/ src/pcl/ std-class. lisp#L186- L188
And built SBCL with with :WEAKNESS :KEY-AND-VALUE in both hash tables.
The change does not seem to break anything, the resulting hash tables have :WEAKNESS :KEY-AND-VALUE, but it does not fix the issue either: the classoids in question are still not purged from the system.
This is likely because the classoids (or references to them) are allocated in static space (at least this is how I interpret the results given to me by SEARCH-ROOTS) and therefore the classoids are not collectable by the GC, which means that simple hash table weakness is not enough to remove them.