From: Juho Snellman Date: Fri, 20 Jan 2006 08:34:56 +0000 (+0000) Subject: 0.9.8.47: X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=ee41b142b86e50983bd885141eaf2ede02815000;p=sbcl.git 0.9.8.47: 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) --- diff --git a/NEWS b/NEWS index ad6e59d..c046afc 100644 --- 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 diff --git a/src/compiler/x86-64/c-call.lisp b/src/compiler/x86-64/c-call.lisp index 79117fe..32fb566 100644 --- a/src/compiler/x86-64/c-call.lisp +++ b/src/compiler/x86-64/c-call.lisp @@ -242,6 +242,8 @@ (: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 diff --git a/src/runtime/x86-64-assem.S b/src/runtime/x86-64-assem.S index dbabd4d..02c508a 100644 --- a/src/runtime/x86-64-assem.S +++ b/src/runtime/x86-64-assem.S @@ -60,6 +60,10 @@ .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) - .end diff --git a/version.lisp-expr b/version.lisp-expr index e9f5e96..d7e5e36 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.9.8.46" +"0.9.8.47"