From 77b6b94e74516f50b4ca0b103eaf90488c830be6 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Fri, 1 Nov 2013 18:55:44 +0900 Subject: [PATCH] gc must mark macros as well --- src/gc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gc.c b/src/gc.c index be57884f..c717e608 100644 --- a/src/gc.c +++ b/src/gc.c @@ -239,6 +239,11 @@ gc_mark_phase(pic_state *pic) gc_mark(pic, pic->globals[i]); } + /* macros */ + for (i = 0; i < pic->mlen; ++i) { + gc_mark_object(pic, (struct pic_object *)pic->macros[i]); + } + /* pool */ for (i = 0; i < pic->plen; ++i) { gc_mark(pic, pic->pool[i]);