mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-01-24 13:31:58 -08:00
make sure interrupts are enabled again after having been disabled
This is important to prevent race conditions. If interrupts are
left disabled, the environment may be wrongly write protected by
an interrupting thread and completely harmless writes in the
environment can lead to segmentation faults.
This commit is contained in:
parent
6316012408
commit
ba8b85fc22
2 changed files with 2 additions and 1 deletions
|
|
@ -358,6 +358,7 @@ ecl_wakeup_waiters(cl_env_ptr the_env, cl_object q, int flags)
|
|||
}
|
||||
}
|
||||
ecl_giveup_spinlock(&q->queue.spinlock);
|
||||
ecl_enable_interrupts_env(the_env);
|
||||
ecl_process_yield();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -834,8 +834,8 @@ list_directory(cl_object base_dir, cl_object text_mask, cl_object pathname_mask,
|
|||
# endif /* !ECL_MS_WINDOWS_HOST */
|
||||
#endif /* !HAVE_DIRENT_H */
|
||||
|
||||
ecl_enable_interrupts();
|
||||
OUTPUT:
|
||||
ecl_enable_interrupts();
|
||||
return cl_nreverse(out);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue