summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Barlow <dan@telent.net>2003-04-25 23:43:07 +0000
committerDaniel Barlow <dan@telent.net>2003-04-25 23:43:07 +0000
commit9086ddef369825b92533128f68dc04e0b165ea40 (patch)
treeec572900378e0d66e7e17b1742551b7d589efeb9
parentf06a378c741965a906b6a042c9420efb9c51198f (diff)
0.pre8.105
Add #include <errno.h>, 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.
-rw-r--r--src/runtime/gencgc.c16
-rw-r--r--src/runtime/interr.c2
-rw-r--r--src/runtime/x86-linux-os.c6
-rw-r--r--version.lisp-expr2
4 files changed, 22 insertions, 4 deletions
diff --git a/src/runtime/gencgc.c b/src/runtime/gencgc.c
index c231ae3f7..17064eefa 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 b86e40f46..e4df5ec9a 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 9b4610764..d943e6fb8 100644
--- a/src/runtime/x86-linux-os.c
+++ b/src/runtime/x86-linux-os.c
@@ -20,6 +20,7 @@
#include <sys/file.h>
#include <sys/types.h>
#include <unistd.h>
+#include <errno.h>
#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 b2ac7fcc8..b5476c882 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"