Unhandled memory fault in code from random tester

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

Bug Description

(defun f367 (a b c)
    (declare (notinline funcall))
    (labels ((%f7 (f7-1 &optional (f7-2 0) (f7-3 0))
               (let ((*s1*
                      (labels ((%f10
                                   (f10-1
                                    &optional
                                    (f10-3 (setf b 0))
                                    (f10-4 (decf f7-1 b))
                                    &key)
                                 0))
                        (declare (dynamic-extent (function %f10)))
                        (funcall #'%f10 0))))
                 (declare (special *s1*))
                 (eval 0))))
      (%f7 a 0 (%f7 c 0))))

(f367 0 0 0) ==>

CORRUPTION WARNING in SBCL pid 6224(tid 0x7f21ba708b80):
Memory fault at 0xffffffffffffffe0 (pc=0x41cee7, sp=0x7f21b8c7fac0)
The integrity of this image is possibly compromised.
Continuing with fingers crossed.

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

Simplified:

(defun f367 (a b c)
    (declare (notinline funcall))
    (labels ((%f7 (f7-1 &optional (f7-2 0) (f7-3 0))
               (labels ((%f10
                            (f10-1
                             &optional
                             (f10-3 (setf b 0))
                                    (f10-4 (decf f7-1 b))
                                    &key)
                          0))
                 (declare (dynamic-extent (function %f10)))
                 (funcall #'%f10 0))))
      (%f7 a 0 (%f7 c 0))))

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

(defun f367 (b)
  (flet ((%f7 ()
           (flet ((%f10 ()
                    (decf b b)))
             (declare (dynamic-extent #'%f10))
             (funcall (eval #'%f10)))))
    (declare (notinline %f7))
    (%f7)))

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

4dc269c9fce3ec3b74535ef3266b7aa5c4afa005

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.