mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-18 07:12:26 -08:00
Explicitly mark the current thread environment, just in case it was not properly installed in cl_core.processes (this happens when registering external threads).
This commit is contained in:
parent
14c352593b
commit
0e1d0226b2
1 changed files with 6 additions and 8 deletions
|
|
@ -1284,6 +1284,7 @@ ecl_mark_env(struct cl_env_struct *env)
|
|||
static void
|
||||
stacks_scanner()
|
||||
{
|
||||
cl_env_ptr the_env = ecl_process_env();
|
||||
cl_object l;
|
||||
l = cl_core.libraries;
|
||||
if (l) {
|
||||
|
|
@ -1297,20 +1298,17 @@ stacks_scanner()
|
|||
}
|
||||
GC_push_all((void *)(&cl_core), (void *)(&cl_core + 1));
|
||||
GC_push_all((void *)cl_symbols, (void *)(cl_symbols + cl_num_symbols_in_core));
|
||||
if (the_env != NULL)
|
||||
ecl_mark_env(the_env);
|
||||
#ifdef ECL_THREADS
|
||||
l = cl_core.processes;
|
||||
if (l == OBJNULL) {
|
||||
ecl_mark_env(&cl_env);
|
||||
} else {
|
||||
l = cl_core.processes;
|
||||
if (l != OBJNULL) {
|
||||
loop_for_on_unsafe(l) {
|
||||
cl_object process = ECL_CONS_CAR(l);
|
||||
struct cl_env_struct *env = process->process.env;
|
||||
ecl_mark_env(env);
|
||||
cl_env_ptr env = process->process.env;
|
||||
if (env != the_env) ecl_mark_env(env);
|
||||
} end_loop_for_on_unsafe(l);
|
||||
}
|
||||
#else
|
||||
ecl_mark_env(&cl_env);
|
||||
#endif
|
||||
if (old_GC_push_other_roots)
|
||||
(*old_GC_push_other_roots)();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue