master: arm64: off by one in utf8-to-character-string-sized

stassats via Sbcl-commits <[email protected]> Thu, 30 Jul 2026 03:14:58 +0000
Newsgroups gmane.lisp.steel-bank.cvs
Message-ID <[email protected]>
The branch "master" has been updated in SBCL:
       via  0a4f44a4f21ab035657ff3718d258bcdc65151e6 (commit)
      from  87357677a4f80935cef6d048afbbc413e39ded17 (commit)

- Log -----------------------------------------------------------------
commit 0a4f44a4f21ab035657ff3718d258bcdc65151e6
Author: Stas Boukarev <[email protected]>
Date:   Thu Jul 30 06:00:00 2026 +0300

    arm64: off by one in utf8-to-character-string-sized
---
 src/code/arm64-simd.lisp | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/src/code/arm64-simd.lisp b/src/code/arm64-simd.lisp
index ca717b2fa..9e35ae4b7 100644
--- a/src/code/arm64-simd.lisp
+++ b/src/code/arm64-simd.lisp
@@ -537,7 +537,7 @@
      (let* ((head (sb-impl::buffer-head ibuf))
             (tail (sb-impl::buffer-tail ibuf))
             (left (- end start))
-            (string-end (- left (/ 32 4)))
+            (string-end (- left (/ 64 4)))
             (byte-end (- tail head 16)))
        (multiple-value-bind (copied written)
            (inline-vop (((byte-start any-reg) head)
@@ -563,7 +563,6 @@
                         ((tbl4         complex-double-reg))
 
                         ((nibble-mask  complex-double-reg))
-                        ((ones         complex-double-reg))
                         ((c-c0         complex-double-reg))
                         ((c-ff complex-double-reg))
                         ((c-4 complex-double-reg))
@@ -585,6 +584,7 @@
                         ((s1 complex-double-reg t :offset 8))
                         ((s2 complex-double-reg t :offset 9))
                         ($when $sized
+                               ((ones complex-double-reg))
                                ((length1 complex-double-reg t :offset 10))
                                ((length2 complex-double-reg t :offset 11))))
                ((copied unsigned-reg positive-fixnum)
@@ -809,7 +809,6 @@
 
              ERROR
              FULL-DONE
-
              (inst add byte-array byte-array suffix) ;; strip any consumed continuations bytes
              DONE
              (inst sub copied byte-array byte-array*)
@@ -1096,7 +1095,7 @@
      (let* ((head (sb-impl::buffer-head ibuf))
             (tail (sb-impl::buffer-tail ibuf))
             (left (- end start))
-            (string-end (- left (/ 32 4)))
+            (string-end (- left (/ 64 4)))
             (byte-end (- tail head 32)))
        (multiple-value-bind (copied written)
            (inline-vop (((byte-start any-reg) head)

-----------------------------------------------------------------------


hooks/post-receive
-- 
SBCL