[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Simple example of my bug of 13 July 1981 15:27-EDT




    Date: 19 July 1981 13:25-EDT
    From: John G. Aspinall <JGA at MIT-MC>
    Subject: Simple example of my bug of 13 July 1981 15:27-EDT
    To: BUG-LISP at MIT-MC
    cc: JGA at MIT-MC

    ;; OK here's a simple example of the bug I reported before -

    ;; in JGA;T1 find the following -

    (include ((libmax) gprelude))

    (load '((jga) t2))

    (setq current-foo (make-foo))

    (defun blowout (x y this-foo)
      (declare (flonum x y))
      (setf (foo-slot-a this-foo) x)
      (setf (foo-slot-b this-foo) y))

    ;; and JGA;T2 (which is compiled) just contains the defstruct -

    (include ((libmax) gprelude))

    (defstruct (foo (type flonum-array))
      (foo-slot-a 0.0)
      (foo-slot-b 0.0))

    ;; now in a regular lisp

    (load '((jga) t1))
    (blowout 2.0 3.0 current-foo)

    ;; will demonstrate the bug - you will find x bound to STRUCT=INFO

    I hope this is simple enough to allow you to track it down easily.
    John.

The culprit here is not SETF, but rather the loading (autoloading in this case)
of the file EXTSTR, which was recently broken to do a (SETQ X ...) without
binding it!