Commit 1392bbf6 authored by Marius Wachtler's avatar Marius Wachtler

Fix: GC must visit the 'iter' field of every BoxedIterWrapper

parent bfea693c
...@@ -63,6 +63,7 @@ static void iterwrapperGCVisit(GCVisitor* v, Box* b) { ...@@ -63,6 +63,7 @@ static void iterwrapperGCVisit(GCVisitor* v, Box* b) {
boxGCHandler(v, b); boxGCHandler(v, b);
BoxedIterWrapper* iw = static_cast<BoxedIterWrapper*>(b); BoxedIterWrapper* iw = static_cast<BoxedIterWrapper*>(b);
v->visit(iw->iter);
if (iw->next) if (iw->next)
v->visit(iw->next); v->visit(iw->next);
} }
......
...@@ -45,7 +45,7 @@ public: ...@@ -45,7 +45,7 @@ public:
Box* iter; Box* iter;
Box* next; Box* next;
BoxedIterWrapper(Box* iter) : iter(iter) {} BoxedIterWrapper(Box* iter) : iter(iter), next(NULL) {}
DEFAULT_CLASS(iterwrapper_cls); DEFAULT_CLASS(iterwrapper_cls);
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment