1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-30 03:40:34 +02:00

Fix bug clearing field set

This commit is contained in:
Andy Wingo 2024-10-04 14:00:47 +02:00
parent da4f1ec806
commit cff99c75a8

View file

@ -148,14 +148,16 @@ gc_field_set_clear(struct gc_field_set *set,
// wanted to it could re-add an edge to the remembered set.
set->partly_full.list.head = NULL;
set->full.head = NULL;
struct gc_edge_buffer *buf;
for (buf = partly_full; buf; buf = buf->next) {
struct gc_edge_buffer *buf, *next;
for (buf = partly_full; buf; buf = next) {
next = buf->next;
for (size_t i = 0; i < buf->size; i++)
forget_edge(buf->edges[i], heap);
buf->size = 0;
gc_edge_buffer_list_push(&set->empty, buf);
}
for (buf = full; buf; buf = buf->next) {
for (buf = full; buf; buf = next) {
next = buf->next;
for (size_t i = 0; i < buf->size; i++)
forget_edge(buf->edges[i], heap);
buf->size = 0;