Skip to content

Commit

Permalink
Fix bit-position-overrun on 32-bit.
Browse files Browse the repository at this point in the history
Apply mask-signed-field to the address or it won't be a fixnum for
higher addresses.
  • Loading branch information
stassats committed Nov 23, 2017
1 parent e1a80c0 commit d7650e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/bit-vector.impure-cload.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@
(setf (sb-sys:sap-ref-word addr sb-vm:n-word-bytes)
(ash n-bits sb-vm:n-fixnum-tag-bits))
(multiple-value-bind (object widetag size)
(sb-vm::reconstitute-object (ash (sb-sys:sap-int addr) (- sb-vm:n-fixnum-tag-bits)))
(sb-vm::reconstitute-object (sb-c::mask-signed-field
sb-vm:n-fixnum-bits
(ash (sb-sys:sap-int addr)
(- sb-vm:n-fixnum-tag-bits))))
(declare (ignore widetag))
(assert (simple-bit-vector-p object))
(assert (= size n-bytes))
Expand Down

0 comments on commit d7650e5

Please sign in to comment.