diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-09-13 05:22:37 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-09-13 05:22:37 -0700 |
commit | cd1260bb180dae6686a7059540e49ebe9f1b7543 (patch) | |
tree | 0991d22e3b7ef96fab81cde8ae7fe3693a6f608d /lib.c | |
parent | 4a5140fe4b466b55bad596eab4662499f54cd1f3 (diff) | |
download | txr-cd1260bb180dae6686a7059540e49ebe9f1b7543.tar.gz txr-cd1260bb180dae6686a7059540e49ebe9f1b7543.tar.bz2 txr-cd1260bb180dae6686a7059540e49ebe9f1b7543.zip |
seq_iter: gc crash marking vector iterator.
* lib.c (si_vec_ops): This must be initialized with
seq_iter_ops_init_nomark, since it uses a cnum index, and not
a val iter; the seq_iter_mark_op will pass the cnum bit
pattern to gc_mark an cause a crash.
(si_null_ops): While we are at it, this should also use
seq_iter_ops_init_nomark, because it->ui.iter is always nil.
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -866,14 +866,14 @@ static void seq_iter_mark_op(struct seq_iter *it) gc_mark(it->ui.iter); } -struct seq_iter_ops si_null_ops = seq_iter_ops_init(seq_iter_get_nil, - seq_iter_peek_nil); +struct seq_iter_ops si_null_ops = seq_iter_ops_init_nomark(seq_iter_get_nil, + seq_iter_peek_nil); struct seq_iter_ops si_list_ops = seq_iter_ops_init(seq_iter_get_list, seq_iter_peek_list); -struct seq_iter_ops si_vec_ops = seq_iter_ops_init(seq_iter_get_vec, - seq_iter_peek_vec); +struct seq_iter_ops si_vec_ops = seq_iter_ops_init_nomark(seq_iter_get_vec, + seq_iter_peek_vec); struct seq_iter_ops si_hash_ops = seq_iter_ops_init(seq_iter_get_hash, seq_iter_peek_hash); |