diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-02-24 07:38:26 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-02-24 07:38:26 -0800 |
commit | 6fd4ad522c16e95170300fe7481553f5a8704b78 (patch) | |
tree | 2a6877a89a7a6c1a4a7ab18a151facffa21a025d | |
parent | af8cd95b6ebb41070993c8d93f69b4acd124b67d (diff) | |
download | txr-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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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; |