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 | 8b03aa84e1a22252fd3b72c47aa890d50774c84c (patch) | |
tree | 2a6877a89a7a6c1a4a7ab18a151facffa21a025d | |
parent | dbc38a2e779bf1803e30581dbbf1d71a259b20e9 (diff) | |
download | txr-8b03aa84e1a22252fd3b72c47aa890d50774c84c.tar.gz txr-8b03aa84e1a22252fd3b72c47aa890d50774c84c.tar.bz2 txr-8b03aa84e1a22252fd3b72c47aa890d50774c84c.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; |