From: Daniel Barlow Date: Fri, 25 Apr 2003 23:43:07 +0000 (+0000) Subject: 0.pre8.105 X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=9086ddef369825b92533128f68dc04e0b165ea40;p=sbcl.git 0.pre8.105 Add #include , for +sb-threads builds on some Linux distros in which the existing include files don't seem to have dragged it in already Change the PSEUDO_ATOMIC_ATOMIC assert in alloc to print more detail. If you run into this bug, sbcl-devel wants to know. --- diff --git a/src/runtime/gencgc.c b/src/runtime/gencgc.c index c231ae3..17064ee 100644 --- a/src/runtime/gencgc.c +++ b/src/runtime/gencgc.c @@ -4194,8 +4194,20 @@ alloc(int nbytes) /* there are a few places in the C code that allocate data in the * heap before Lisp starts. This is before interrupts are enabled, * so we don't need to check for pseudo-atomic */ - gc_assert(SymbolValue(PSEUDO_ATOMIC_ATOMIC,th)); - +#ifdef LISP_FEATURE_SB_THREAD + if(!SymbolValue(PSEUDO_ATOMIC_ATOMIC,th)) { + register u32 fs; + fprintf(stderr, "fatal error in thread 0x%x, pid=%d\n", + th,getpid()); + __asm__("movl %fs,%0" : "=r" (fs) : ); + fprintf(stderr, "fs is %x, th->tls_cookie=%x (should be identical)\n", + debug_get_fs(),th->tls_cookie); + lose("If you see this message before 2003.05.01, mail details to sbcl-devel\n"); + } +#else + gc_assert(SymbolValue(PSEUDO_ATOMIC_ATOMIC,th)); +#endif + /* maybe we can do this quickly ... */ new_free_pointer = region->free_pointer + nbytes; if (new_free_pointer <= region->end_addr) { diff --git a/src/runtime/interr.c b/src/runtime/interr.c index b86e40f..e4df5ec 100644 --- a/src/runtime/interr.c +++ b/src/runtime/interr.c @@ -46,7 +46,7 @@ never_returns lose(char *fmt, ...) { va_list ap; - fprintf(stderr, "fatal error encountered in SBCL pid %d\n",getpid()); + fprintf(stderr, "fatal error encountered in SBCL pid %d",getpid()); if (fmt) { fprintf(stderr, ":\n"); va_start(ap, fmt); diff --git a/src/runtime/x86-linux-os.c b/src/runtime/x86-linux-os.c index 9b46107..d943e6f 100644 --- a/src/runtime/x86-linux-os.c +++ b/src/runtime/x86-linux-os.c @@ -20,6 +20,7 @@ #include #include #include +#include #include "./signal.h" #include "os.h" @@ -127,6 +128,11 @@ struct thread *arch_os_get_current_thread() { return all_threads; #endif } +struct thread *debug_get_fs() { + register u32 fs; + __asm__("movl %%fs,%0" : "=r" (fs) : ); + return fs; +} /* free any arch/os-specific resources used by thread, which is now * defunct. Not called on live threads diff --git a/version.lisp-expr b/version.lisp-expr index b2ac7fc..b5476c8 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -17,4 +17,4 @@ ;;; 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".) -"0.pre8.104" +"0.pre8.105"