summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-02-24 07:38:26 -0800
committerKaz Kylheku <kaz@kylheku.com>2019-02-24 07:38:26 -0800
commit6fd4ad522c16e95170300fe7481553f5a8704b78 (patch)
tree2a6877a89a7a6c1a4a7ab18a151facffa21a025d
parentaf8cd95b6ebb41070993c8d93f69b4acd124b67d (diff)
downloadtxr-6fd4ad522c16e95170300fe7481553f5a8704b78.tar.gz
txr-6fd4ad522c16e95170300fe7481553f5a8704b78.tar.bz2
txr-6fd4ad522c16e95170300fe7481553f5a8704b78.zip
parser: gc bug in handling circular notation.
* parser.c (parser_circ_def): When we lazily add the circ_ref_hash to the parser, this is possibly a wrong-way assignment (pointer to a baby object being stored into a mature object). The handling for this is missing.
-rw-r--r--parser.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/parser.c b/parser.c
index 99c6d728..63796352 100644
--- a/parser.c
+++ b/parser.c
@@ -385,8 +385,10 @@ void parser_resolve_circ(parser_t *p)
void parser_circ_def(parser_t *p, val num, val expr)
{
- if (!p->circ_ref_hash)
+ if (!p->circ_ref_hash) {
p->circ_ref_hash = make_hash(nil, nil, nil);
+ setcheck(p->parser, p->circ_ref_hash);
+ }
{
val new_p = nil;