[Bug-openmcl] dynamic-extent problem

Gary Byers gb at clozure.com
Tue Mar 2 19:43:41 MST 2004


It's fixed in CVS; thanks.

It's a small change to some assembler code in the kernel, but it
might not hurt to recompile everything a time or two just to be sure
that its effects are gone.

On Tue, 2 Mar 2004, Erik Pearson wrote:

> Oops, I had removed some code to simplify the example, but that broke
> bug. The affected function needs to be declaimed inline:
>
> Test code is:
>
> (defun test1 (&rest keys &key a b c &allow-other-keys)
>    (declare (ignore a b c))
>    (apply #'test2 keys))
>
> (defun test2 (&rest keys &key a &allow-other-keys)
>    (format t "[test2] I got ~A ~A ~&" keys a)
>    (apply #'test3 keys))
>
> (declaim (inline test3))
> (defun test3 (&rest keys &key b &allow-other-keys)
>    (declare (dynamic-extent keys))
>    (format t "[test3] I got ~A ~A ~&" keys b))
>
> (test1 :a 1 :b 2 :c 3)
>
> Test procedure:
>
> 1. store in file "test.lisp"
> 2. compile-file test.lisp
> 3. load test.lisp
>
> You'll see the bug.
>
> You can also do:
>
> 1. store in file "test.lisp"
> 2. load test.lisp
> 3. load test.lisp
>
> That is, if you load 2 times the error will show itself, but not on the
> first load.
>
> Erik.
>
> Erik Pearson wrote:
>
> > Hi,
> >
> > It looks like an update to bleeding edge has caused a problem with the
> > usage of (declare (dynamic-extent ..)). In the example below it turns
> > the keys argument into T in function test3.
> >
> > This is currently breaking things like make-socket.
> >
> > Erik.
> >
> > -----
> >
> > (defun test1 (&rest keys &key a b c &allow-other-keys)
> >   (declare (ignore a b c))
> >   (apply #'test2 keys))
> >
> > (defun test2 (&rest keys &key a &allow-other-keys)
> >
> >   (format t "[test2] I got ~A ~A ~&" keys a)
> >   (apply #'test3 keys))
> >
> > (defun test3 (&rest keys &key b &allow-other-keys)
> >   (declare (dynamic-extent keys))
> >   (format t "[test3] I got ~A ~A ~&" keys b))
> >
> > (test1 :a 1 :b 2 :c 3)
> >
> >
> >
> > _______________________________________________
> > Bug-openmcl mailing list
> > Bug-openmcl at clozure.com
> > http://clozure.com/mailman/listinfo/bug-openmcl
> _______________________________________________
> Bug-openmcl mailing list
> Bug-openmcl at clozure.com
> http://clozure.com/mailman/listinfo/bug-openmcl
>
>


More information about the Bug-openmcl mailing list