full call to SB-VM::%LOGBITP

Bug #1824351 reported by Paul F. Dietz
32
This bug affects 2 people
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Medium
Unassigned

Bug Description

(defun f371 (a)
  (labels ((%f1 (&optional (f1-4 0) (f1-5 0))
              (return-from %f1
                (complex
                 (catch 'ct2
                   (labels ((%f14 (f14-1)
                              (loop for lv1 below 3
                                    count t)))
                     (complex
                      (%f14
                       (if (logbitp 0 (multiple-value-call #'%f14 (values 0)))
                           (return-from %f1 (%f14 3))
                           0))
                      0)))
                 0))))
     (%f1 (complex (%f1 0 a) 0) 0)))
==>
full call to SB-VM::%LOGBITP
[...]
Backtrace:
  0: (SB-INT:BUG "full call to ~S" SB-VM::%LOGBITP)
  1: (SB-C::PONDER-FULL-CALL #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME SB-VM::%LOGBITP :TYPE #1=#<SB-KERNEL:FUN-TYPE #> :DEFINED-TYPE #1# :WHERE-FROM :DECLARED :KIND :GLO..
  2: (SB-C::IR2-CONVERT-FULL-CALL #<SB-C::COMBINATION :FUN #<SB-C::REF :LEAF #<SB-C::GLOBAL-VAR :%SOURCE-NAME SB-VM::%LOGBITP :TYPE #1=#<SB-KERNEL:FUN-TYPE #> :DEFINED-TYPE #1# :WHERE-FROM :DECLARED :KIND..
  3: (SB-C::IR2-CONVERT-BLOCK #<SB-C::CBLOCK 7 :START c1 {10366174E3}>)
 [...]

Revision history for this message
Stas Boukarev (stassats) wrote :

(defun f371 ()
  (catch 'ct
    (flet ((%f14 (x)
             (the fixnum x)))
      (if (logbitp 0
                   (multiple-value-call #'%f14 1))
          (the integer (%f14 2))))))

Changed in sbcl:
importance: Undecided → Medium
Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

Not sure if this is a duplicate of 1813839

Revision history for this message
Stas Boukarev (stassats) wrote :

I think it is, but i like this test case better.

Revision history for this message
Paul F. Dietz (paul-f-dietz) wrote :

Another example producing the bug:

(lambda (b c)
  (declare (type fixnum b))
  (declare
   (optimize (safety 0) (compilation-speed 2) (debug 0)
             (space 0) (speed 3)))
  (logbitp 0
           (if (find c '(0))
               (max (ignore-errors c) 0)
               b)))

Stas Boukarev (stassats)
Changed in sbcl:
status: New → Fix Committed
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.