When queueing ephemerons for the key stored at some address, compare
the address to the weak referent address of each ephemeron's key --
not to the object address of each ephemeron's key, which causes us to
miss ephemerons whose keys are compiled entries, because we pass the
addresses of compiled blocks, never those of the compiled entries
stored in them, to queue_ephemerons_for_key.
SCHEME_OBJECT * entry_addr = (OBJECT_ADDRESS (entry));
SCHEME_OBJECT * next_loc
= (NEWSPACE_TO_TOSPACE (entry_addr + EPHEMERON_NEXT));
- if (addr == (OBJECT_ADDRESS (READ_TOSPACE (entry_addr + EPHEMERON_KEY))))
+ SCHEME_OBJECT * key_addr
+ = (weak_referent_address (READ_TOSPACE (entry_addr + EPHEMERON_KEY)));
+ if (addr == key_addr)
{
(*entry_loc) = (*next_loc);
(*next_loc) = ephemeron_queue;