The value -2147483650 is not of type (INTEGER -2147483648 4294967295) when binding #:|ARG-FOR-(BYTE 32 0)-1|

Bug #1999397 reported by Paul F. Dietz
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

(defmacro req-type (form tp)
  (let ((form-var (gensym)) (tp-var (gensym)))
    `(let ((,form-var ,form)
           (,tp-var ',tp))
       (assert (typep ,form-var ,tp-var))
       ,form-var)))

(defun bug104 (a b)
  (declare (type (integer -2154091710656358 663147669554558) b))
  (declare (optimize speed))
  (logxor
   (lognor (setq a -336272099380508247)
           (shiftf b (logorc1 1073741832 a)))
   (req-type
    (setf a (lognand b 11))
    (integer -504635362412860905 -99686857090873309))))

==>

The value
  -2147483650
is not of type
  (INTEGER -2147483648 4294967295)
when binding #:|ARG-FOR-(BYTE 32 0)-1|
   [Condition of type TYPE-ERROR]

Restarts:
 0: [RETRY] Retry SLIME REPL evaluation request.
 1: [*ABORT] Return to SLIME's top level.
 2: [REMOVE-FD-HANDLER] Remove #<SB-IMPL::HANDLER INPUT on descriptor 4: #<FUNCTION (LABELS SWANK/SBCL::RUN :IN SWANK/BACKEND:ADD-FD-HANDLER) {100A8DB9BB}>>
 3: [ABORT] Exit debugger, returning to top level.

Backtrace:
  0: (SB-X86-64-ASM::EMIT-DWORD #<SB-ASSEM:SEGMENT {10138326F3}> -2147483650) [external]
  1: (SB-ASSEM::%ASSEMBLE #<SB-ASSEM:SEGMENT {10138326F3}> (#<SB-ASSEM::STMT IGNORE {1013830F63}> . #<SB-ASSEM::STMT .ALIGN {1013832833}>))
  2: (SB-ASSEM:ASSEMBLE-SECTIONS #S(SB-ASSEM::ASMSTREAM :DATA-SECTION (#<SB-ASSEM::STMT IGNORE {1013830F63}> . #<SB-ASSEM::STMT .ALIGN {1013832833}>) :CODE-SECTION (#1=#<SB-ASSEM::STMT IGNORE {1013830FA3}>..
  3: (SB-C::GENERATE-CODE #<SB-C:COMPONENT :NAME "<unknown>" {10137F7C33}>)
  4: (SB-C::%COMPILE-COMPONENT #<SB-C:COMPONENT :NAME "<unknown>" {10137F7C33}>)
  5: (SB-C::COMPILE-COMPONENT #<SB-C:COMPONENT :NAME "<unknown>" {10137F7C33}>)
  6: (SB-C::%COMPILE (SB-INT:NAMED-LAMBDA BUG104 (A B) (DECLARE (TYPE # B)) (DECLARE (OPTIMIZE SPEED)) (BLOCK BUG104 (LOGXOR # #))) #<SB-C::CORE-OBJECT {10137EDDA3}> :NAME NIL :PATH (SB-C::ORIGINAL-SOURCE-..

x86-64, "2.2.11.84-85c648e6a"

Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Committed
Stas Boukarev (stassats)
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.