0.9.8.47:
authorJuho Snellman <jsnell@iki.fi>
Fri, 20 Jan 2006 08:34:56 +0000 (08:34 +0000)
committerJuho Snellman <jsnell@iki.fi>
Fri, 20 Jan 2006 08:34:56 +0000 (08:34 +0000)
        Clear the direction flag on Lisp -> C transitions, as
        required by the x86-64 ABI. Fixes mysterious GC crashes on
        SuSE. (reported by Andrej Grozin and Hendrik Maryns)

NEWS
src/compiler/x86-64/c-call.lisp
src/runtime/x86-64-assem.S
version.lisp-expr

diff --git a/NEWS b/NEWS
index ad6e59d..c046afc 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -13,6 +13,9 @@ changes in sbcl-0.9.9 relative to sbcl-0.9.8:
     grounding in the PCL implementation of CLOS.
   * bug fix: TRUENAME on "/" no longer returns a relative pathname.
     (reported by tomppa on #lisp)
+  * bug fix: clear the direction flag on Lisp -> C transitions, as 
+    required by the x86-64 ABI. Fixes mysterious GC crashes on SuSE.
+    (reported by Andrej Grozin and Hendrik Maryns)
   * optimization: major improvements to GC efficiency on GENCGC platforms
   * optimization: faster implementation of EQUAL
   * optimization: emit more efficient opcodes for some common 
index 79117fe..32fb566 100644 (file)
   (:vop-var vop)
   (:save-p t)
   (:generator 0
+    ;; ABI: Direction flag must be clear on function entry. -- JES, 2006-01-20
+    (inst cld)
     ;; ABI: AL contains amount of arguments passed in XMM registers
     ;; for vararg calls.
     (move-immediate rax
index dbabd4d..02c508a 100644 (file)
        .global GNAME(call_into_c)
        .type   GNAME(call_into_c),@function
 GNAME(call_into_c):
+        /* ABI requires that the direction flag be clear on function
+         * entry and exit. */
+        cld
+        
        push    %rbp            # Save old frame pointer.
        mov     %rsp,%rbp       # Establish new frame.
 
@@ -179,6 +183,10 @@ Lcall:
        pop     %r12
        pop     %rbx
 
+        /* ABI requires that the direction flag be clear on function
+         * entry and exit. */
+        cld
+        
 /* FIXME Restore the NPX state. */
 
        /* return value is already in rax where lisp expects it */
@@ -384,5 +392,4 @@ Lend:
        ret
        .size   GNAME(fast_bzero), .-GNAME(fast_bzero)
 
-\f
         .end
index e9f5e96..d7e5e36 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.8.46"
+"0.9.8.47"