[plt-scheme] problem with weak hash tables?

From: Geoffrey Knauth (geoff at knauth.org)
Date: Mon May 9 03:20:27 EDT 2005

Possible wild goose chase, but I wonder if it is a GCC problem?  Is  
there C++ code in PLT?  (I wouldn't think so, but I could be wrong.)   
There was a problem with some GCC 3 versions, C++ code, and rare  
incorrect compilation.  Or maybe that was just a problem on Mac OS X.

Geoffrey S. Knauth | http://knauth.org/gsk

On May 8, 2005, at 18:46, Doug Orleans wrote:

>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> I'm running into a bug that I think has to do with weak hash tables.
> The symptom seems to be that a value is being dropped from a weak hash
> table when its key is still reachable.  This is not consistently
> reproducible-- it only happens once every ten times or so running my
> test program, and each run makes several thousand references to weak
> hash tables.  The tables use eq, not equal, and I am not mutating the
> keys, which are regular structure instances.  My program has no other
> sources of non-determinism that I'm aware of; it's single-threaded and
> doesn't use I/O.  I am using parameters and call-with- 
> parameterization,
> though.  I can't seem to make it happen more repeatably by explicitly
> calling `collect-garbage' in between table accesses-- in fact I
> haven't been able to reproduce the bug at all when I do that, but it
> runs slower that way so I haven't been doing it as much.
> Anyway, is it possible that this is a bug in the garbage collector or
> something else relating to weak hash tables?  I'm really at a loss to
> figure out how else to explain this behavior, or even what I can do to
> better isolate the problem.  Any advice would be appreciated.
> --dougo at place.org
> P.S. I'm using MzScheme v299.101 built from CVS on Linux.

Posted on the users mailing list.