Commit bed5aa20 authored by Marius Wachtler's avatar Marius Wachtler

Fix gc visiting code for running generators

I verified with gdb that this now really visits all entries of the return context struct
parent f1129a84
......@@ -406,8 +406,8 @@ extern "C" void generatorGCHandler(GCVisitor* v, Box* b) {
v->visit(g->exception.traceback);
if (g->running) {
v->visitPotentialRange((void**)&g->returnContext,
((void**)&g->returnContext) + sizeof(*g->returnContext) / sizeof(void*));
v->visitPotentialRange((void**)g->returnContext,
((void**)g->returnContext) + sizeof(*g->returnContext) / sizeof(void*));
} else {
// g->context is always set for a running generator, but we can trigger a GC while constructing
// a generator in which case we can see a NULL context
......
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