[plt-scheme] Compiler bug?

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Tue Apr 17 07:39:39 EDT 2007

At Mon, 16 Apr 2007 14:49:23 -0400, "Jay McCarthy" wrote:
> If I change net/url-structs.ss to:
> [...]
> jay $ setup-plt
> setup-plt: bootstrapping from source...
> default-load-handler: cannot open input file:
> "/Users/jay/Development/plt/src/plt/trunk/collects/syntax/moddep.ss"
> (Too many open files; errno=24)

Module require-cycle checking has been broken since version 369.2,
apparently. (I was missing a test case before.) It's now fixed in SVN.

The cause of the bug was interesting.

To detect cycles, the module loader installs a continuation mark with
the path of the file being loaded. Before loading a file, the module
loader gets the current continuation marks and checks whether the file
to be loaded is already in the list.

As of 369.2, though, file loading is wrapped with a prompt. Since a
prompt blocks continuation-mark capture the same as continuation
capture, the mark list for files being loaded was always empty.

The repair is for the module loader to install a prompt with its own
private tag, if there's no prompt for that tag already. The module
loader also checks the current continuation marks using its private
tag, so that it can see past the file-loading prompt (which uses the
default module prompt tag).


Posted on the users mailing list.