changes in sbcl-1.0.6 relative to sbcl-1.0.5:
* bug fix: GETHASH, (SETF GETHASH), CLRHASH and REMHASH are now
interrupt safe.
+ * bug fix: GC race condition occasionally resulting in crashes with
+ the error message "SIG_STOP_FOR_GC blocked at a bad place" has been
+ fixed.
changes in sbcl-1.0.5 relative to sbcl-1.0.4:
* incompatible change: removed writer methods for host-ent-name,
*/
#ifndef LISP_FEATURE_WIN32
if(SymbolValue(INTERRUPTS_ENABLED,thread)!=NIL) {
- thread_sigmask(SIG_SETMASK, os_context_sigmask_addr(context), 0);
- check_gc_signals_unblocked_or_lose();
+ sigset_t *context_sigmask = os_context_sigmask_addr(context);
+ /* What if the context we'd like to restore has GC signals
+ * blocked? Just skip the GC: we can't set GC_PENDING, because
+ * that would block the next attempt, and we don't know when
+ * we'd next check for it -- and it's hard to be sure that
+ * unblocking would be safe. */
+ if (sigismember(context_sigmask,SIG_STOP_FOR_GC)) {
+ undo_fake_foreign_function_call(context);
+ return 1;
+ }
+ thread_sigmask(SIG_SETMASK, context_sigmask, 0);
}
else
unblock_gc_signals();
}
void
-check_gc_signals_unblocked_or_lose(void)
-{
-#ifdef LISP_FEATURE_SB_THREAD
-# if !defined(LISP_FEATURE_WIN32)
- /* Get the current sigmask, by blocking the empty set. */
- sigset_t empty,current;
- sigemptyset(&empty);
- thread_sigmask(SIG_BLOCK, &empty, ¤t);
- if (sigismember(¤t, SIG_STOP_FOR_GC))
- lose("SIG_STOP_FOR_GC blocked in thread %p at a bad place\n",
- arch_os_get_current_thread());
-# if defined(SIG_RESUME_FROM_GC)
- if (sigismember(¤t, SIG_RESUME_FROM_GC))
- lose("SIG_RESUME_FROM_GC blocked in thread %p at a bad place\n",
- arch_os_get_current_thread());
-# endif
-# endif
-#endif
-}
-
-void
unblock_gc_signals(void)
{
#ifdef LISP_FEATURE_SB_THREAD
;;; checkins which aren't released. (And occasionally for internal
;;; versions, especially for internal versions off the main CVS
;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"1.0.5.3"
+"1.0.5.4"