psyntax's labels and marks now unique over a read/write boundary
authorAndy Wingo <wingo@pobox.com>
Sun, 20 Dec 2009 14:29:09 +0000 (15:29 +0100)
committerAndy Wingo <wingo@pobox.com>
Sun, 20 Dec 2009 14:30:32 +0000 (15:30 +0100)
commitfd5985271fee3bcb6a290b6ad10525980a97ef8d
tree6bbdcf18661bf2b1531342bbdc6fd353a23a941e
parentef73663576c54d04bd9f1dfe1cdf587515e5cc71
psyntax's labels and marks now unique over a read/write boundary

* module/ice-9/psyntax.scm (gen-label, new-mark): Labels and marks need
  to be unique across read/write boundaries -- it's not sufficient for
  them to simply be unique within a process by virtue of (string #\i)
  constructing a new object. This used to mostly work before, because
  the collapsing of duplicate constants didn't catch many syntax-object
  cases -- but for some reason the attached test case brings out the
  problem. So switch to use gensyms. Potentially more costly, but it's
  what upstream psyntax does now.

  This bug took me fully two days to figure out.

* module/ice-9/psyntax-pp.scm: Regenerated.

* test-suite/tests/syncase.test ("serializable labels and marks"): Add
  test case.
module/ice-9/psyntax-pp.scm
module/ice-9/psyntax.scm
test-suite/tests/syncase.test