0.6.12.17:
authorWilliam Harold Newman <william.newman@airmail.net>
Sun, 27 May 2001 15:20:15 +0000 (15:20 +0000)
committerWilliam Harold Newman <william.newman@airmail.net>
Sun, 27 May 2001 15:20:15 +0000 (15:20 +0000)
revised address map for OpenBSD (fixing memory corruption
problem)

src/compiler/x86/backend-parms.lisp
src/compiler/x86/parms.lisp
src/runtime/bsd-os.c
version.lisp-expr

index a45206f..057a09c 100644 (file)
 ;;; 9 = deleted obsolete CONS-UNIQUE-TAG bytecode in sbcl-0.6.11.8
 ;;; (somewhere in here also changes to AND and OR CTYPE layouts) 
 ;;; 10 = new layout for CONDITION in sbcl-0.6.11.38
-;;; 11 = new helper functions for MAKE-LOAD-FORM (HASH-TABLE) in
+;;; 11 = (a) new helper functions for MAKE-LOAD-FORM (HASH-TABLE) in
 ;;;      sbcl-0.6.12.11
+;;;      (b) new address space constants for OpenBSD in 0.6.12.17,
+;;;          doesn't need separate version from (a) because the OpenBSD
+;;;          port was broken from sometime before 0.6.12.11 until
+;;;          the address space was changed
 
 (setf *backend-register-save-penalty* 3)
 
index e342bf8..8bbe40c 100644 (file)
 ;;;   * On FreeBSD,
 ;;;     ** The space 0x0E000000-0x10000000 is "Foreign segment".
 ;;;     ** The space 0x20000000-0x30000000 is reserved for shared libs.
-;;; And there have been a few changes since the fork:
+;;; And there have been some changes since the fork from CMU CL:
+;;;   * The OpenBSD port is new since the fork. We started with
+;;;     the FreeBSD address map, which actually worked until the
+;;;     Alpha port patches, for reasons which in retrospect are rather
+;;;     mysterious. After the Alpha port patches were added, the
+;;;     OpenBSD port suffered memory corruption problems. While
+;;;     debugging those, it was discovered that src/runtime/trymap
+;;;     failed for the control stack region #x40000000-#x47fff000.
+;;;     After the control stack was moved upward out of this region
+;;;     (stealing some bytes from dynamic space) the problems went
+;;;     away.
 ;;;   * The FreeBSD STATIC-SPACE-START value was bumped up from
 ;;;     #x28000000 to #x30000000 when FreeBSD ld.so dynamic linking
 ;;;     support was added for FreeBSD ca. 20000910. This was to keep from
-;;;     stomping on an address range that the dynamic libraries want to use. 
-;;;     (They want to use this address range even if we try to reserve it
-;;;     with a call to validate() as the first operation in main().)
+;;;     stomping on an address range that the dynamic libraries want to
+;;;     use. (They want to use this address range even if we try to
+;;;     reserve it with a call to validate() as the first operation in
+;;;     main().)
+
 #!+linux
 (progn
 
   (defconstant binding-stack-start   #x38000000)
   (defconstant binding-stack-end     #x3ffff000)
 
-  (defconstant control-stack-start   #x40000000)
-  (defconstant control-stack-end     #x47fff000)
-
-  (defconstant dynamic-space-start   #x48000000)
+  (defconstant control-stack-start
+    #+freebsd #x40000000
+    #+openbsd #x48000000)
+  (defconstant control-stack-end
+    #+freebsd #x47fff000
+    #+openbsd #x4ffff000)
+  (defconstant dynamic-space-start
+    #+freebsd #x48000000
+    #+openbsd #x50000000)
   (defconstant dynamic-space-end     #x88000000))
 
 ;;; Given that NIL is the first thing allocated in static space, we
index 4660240..eaf6e10 100644 (file)
@@ -164,6 +164,10 @@ os_map(int fd, int offset, os_vm_address_t addr, os_vm_size_t len)
     return addr;
 }
 
+/* FIXME: If this can be a no-op on BSD/x86, then it 
+ * deserves a more precise name.
+ *
+ * (Perhaps os_prepare_data_area_to_be_executed()?) */
 void
 os_flush_icache(os_vm_address_t address, os_vm_size_t length)
 {
index aba2d4f..b6f75fb 100644 (file)
@@ -15,4 +15,4 @@
 ;;; versions, and a string like "0.6.5.12" is used for versions which
 ;;; aren't released but correspond only to CVS tags or snapshots.
 
-"0.6.12.16"
+"0.6.12.17"