Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 383325711
  • Loading branch information
common-lisp-dev-copybara authored and copybara-github committed Jul 13, 2021
1 parent 672a79b commit 94030d5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions wire-format.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -819,9 +819,12 @@
;; Don't worry about unaligned writes - they're still faster than
;; looping. Todo: featurize for non-x86 and other than SBCL.
(if (buffer-ensure-space buffer ,n-bytes)
(let ((index (buffer-index buffer)))
(setf (,accessor (buffer-sap buffer) index) val
(buffer-index buffer) (+ index ,n-bytes))
(let ((index (buffer-index buffer))
(block (buffer-block buffer)))
(sb-sys:with-pinned-objects (block)
(setf (,accessor (sb-sys:vector-sap block) index) val
(buffer-index buffer) (+ index ,n-bytes)))
#+ubsan (sb-vm::unpoison-range block index (buffer-index buffer))
,n-bytes)
(let ((scratchpad (octet-buffer-scratchpad buffer)))
(setf (,accessor (sb-sys:vector-sap scratchpad) 0) val)
Expand Down

0 comments on commit 94030d5

Please sign in to comment.