Fix SB-POSIX:STRTOD on -c-stack-is-control-stack

Have to pin a vector.
This commit is contained in:
Stas Boukarev 2025-10-10 00:47:50 +03:00
parent 153608717c
commit aff8f3a02b
4 changed files with 11 additions and 5 deletions

View file

@ -498,7 +498,8 @@
(unwind-protect
(let ((buf (make-array 10 :element-type '(unsigned-byte 8))))
(values
(sb-posix:read fd (sb-sys:vector-sap buf) 10)
(sb-sys:with-pinned-objects (buf)
(sb-posix:read fd (sb-sys:vector-sap buf) 10))
(code-char (aref buf 0))
(code-char (aref buf 1))
(code-char (aref buf 2))))
@ -555,7 +556,9 @@
(retval nil))
(unwind-protect
(let ((buf (coerce "foo" 'simple-base-string)))
(setf retval (sb-posix:write fd (sb-sys:vector-sap buf) 3)))
(setf retval
(sb-sys:with-pinned-objects (buf)
(sb-posix:write fd (sb-sys:vector-sap buf) 3))))
(sb-posix:close fd))
(with-open-file (inf tmpname) (values retval (read-line inf)))))

View file

@ -7,7 +7,7 @@ and a secondary value, the number of characters consumed."
(declare (simple-base-string chars))
;; On x86, dx arrays are quicker to make than aliens.
(sb-int:dx-let ((end (make-array 1 :element-type 'sb-ext:word)))
(sb-sys:with-pinned-objects (chars)
(sb-sys:with-pinned-objects (chars #-c-stack-is-control-stack end)
(let* ((base (sb-sys:sap+ (sb-sys:vector-sap chars) offset))
(answer
(handler-case

View file

@ -524,6 +524,8 @@
(with-test (:name :undefined-fun-macro-error)
(assert (search "is a macro" (princ-to-string (make-condition 'undefined-function :name 'cond)))))
#+gc-stress (invoke-restart 'run-tests::skip-file)
(defun testme (a b) (values "nice" (+ a b)))
(compile 'testme)
(defparameter trace-this-f1 #'testme)

View file

@ -483,7 +483,8 @@
(sb-vm:list-allocated-objects :read-only :type sb-vm:simple-base-string-widetag))
0 1000))
(test-util:with-test (:name :c-find-in-solist)
(test-util:with-test (:name :c-find-in-solist
:skipped-on (and :gc-stress :arm64))
(let ((set (sb-lockless:make-so-set/addr)))
(dolist (x *example-objects*)
(sb-lockless:so-insert set x))