0.9.5.15:
authorJuho Snellman <jsnell@iki.fi>
Sat, 1 Oct 2005 15:58:16 +0000 (15:58 +0000)
committerJuho Snellman <jsnell@iki.fi>
Sat, 1 Oct 2005 15:58:16 +0000 (15:58 +0000)
Give distinct error messages for the two ways mmap() can fail in
        os_validate() (i.e. mmap() can't allocate memory vs. can't map
        it at the requested address).

        Fix a gcc warning when LISP_FEATURE_SB_THREAD.

src/runtime/interrupt.c
src/runtime/linux-os.c
version.lisp-expr

index 48c298a..73eeed8 100644 (file)
@@ -661,7 +661,6 @@ sig_stop_for_gc_handler(int signal, siginfo_t *info, void *void_context)
     os_context_t *context = arch_os_get_context(&void_context);
     struct thread *thread=arch_os_get_current_thread();
     sigset_t ss;
-    int i;
 
     if ((arch_pseudo_atomic_atomic(context) ||
          SymbolValue(GC_INHIBIT,thread) != NIL)) {
index de5368a..2e4e126 100644 (file)
@@ -223,11 +223,17 @@ os_validate(os_vm_address_t addr, os_vm_size_t len)
     }
 #endif
     actual = mmap(addr, len, OS_VM_PROT_ALL, flags, -1, 0);
-    if (actual == MAP_FAILED || (addr && (addr!=actual))) {
+    if (actual == MAP_FAILED) {
         perror("mmap");
         return 0;               /* caller should check this */
     }
 
+    if (addr && (addr!=actual)) {
+        fprintf(stderr, "mmap: wanted %lu bytes at %p, actually mapped at %p\n",
+                (unsigned long) len, addr, actual);
+        return 0;
+    }
+    
 #ifdef LISP_FEATURE_ALPHA
 
     len=(len+(os_vm_page_size-1))&(~(os_vm_page_size-1));
index 5cded11..e181aa8 100644 (file)
@@ -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.9.5.14"
+"0.9.5.15"