fix internal array size on module redeclaration
If a module is redeclared with more phases than before, expand the `running` array.
This commit is contained in:
parent
7982a59a1d
commit
35acfab903
|
@ -5433,6 +5433,12 @@ static Scheme_Env *instantiate_module(Scheme_Module *m, Scheme_Env *env, int res
|
|||
} else {
|
||||
Scheme_Env *env2;
|
||||
|
||||
if (menv->module->num_phases < m->num_phases) {
|
||||
char *running;
|
||||
running = (char *)scheme_malloc_atomic(m->num_phases);
|
||||
menv->running = running;
|
||||
}
|
||||
|
||||
menv->module = m;
|
||||
memset(menv->running, 0, menv->module->num_phases);
|
||||
menv->ran = 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user