[plt-scheme] bug: segfault on ephemeron/weak hash table usage

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Jun 19 22:24:17 EDT 2007

At Tue, 19 Jun 2007 21:27:18 -0400 (EDT), Danny Yoo wrote:
> I ran into an ugly bug in mzscheme 370.

Fixed in SVN.

The bug was 3m-specific. Internally, a weak box as a secondary object
that can be cleared when the box is cleared. When that secondary object
is moved, though, the clearing step didn't follow the moved pointer, so
it didn't actually clear the secondary object. Failing to clear the
secondary object broke an invariant in the implementation of weak hash
tables. (This bugs falls in the "I'm surprised that we didn't hit it
before" category.)

Matthew



Posted on the users mailing list.