Opened 10 years ago

#852 new defect

handling weak-on-value hash tables in EGC

Reported by: gb Owned by:
Priority: normal Milestone:
Component: Runtime (threads, GC) Version: trunk
Keywords: Cc:


r14723 tries to fix the problem described in ticket:717 by treating intergenerational references from weak-on-value hash tables as strong references; this was necessary because the GC didn't always postprocess the underlying hash vector (it wasn't always on GCweakvll).

Comments in the r14723 commit message suggest a way of keeping track of such weak vectors that, if it's viable, seems to be simpler and more reliable than what's currently in place.

The current workaround isn't ideal: we should either restore weak processing of weak-on-value hash vectors in the EGC, or otherwise make the weak-on-value and weak-on-key cases consistent.

I wouldn't object to saying in the documentation that weak references were only guaranteed to be processed by a full GC. That's how things worked (for what I think are good reasons) for many years, and if it had been documented that way we wouldn't have had a scenario where someone designed their code on the assumption that it worked differently and then reported its actual behavior as a bug.

Change History (0)

Note: See TracTickets for help on using tickets.