Lisp HUG Maillist Archive

nasty bug with defstruct

Hello all, If I have the following in a file

(defstruct FOO)
(defstruct (FOO (:include FOO)))

and try to evaluate it, or compile and load it, Lispworks dies
immediately. Obviously the code is bad, and I ended up with it
after a typo or string replace, but it seems LispWorks' reaction
is a little harsh.

It also would seem to corrupt some memory in other places
too (not sure if this would be a MacOS thing, or a Lispworks thing),
as the first several times I did this, my display became garbled.
I haven't been able to reproduce that in a smaller example yet though.
You can see that here:

http://www.cs.rpi.edu/~tayloj/corruption.png
(I covered some things after the fact, but clearly
marked those, everything else you see is what
happened at the crash)
--
=====================
Joshua Taylor
tayloj@rpi.edu


Re: nasty bug with defstruct

Joshua Taylor wrote:

>Hello all, If I have the following in a file
>
>(defstruct FOO)
>(defstruct (FOO (:include FOO)))
>
>and try to evaluate it, or compile and load it, Lispworks dies
>immediately. Obviously the code is bad, and I ended up with it
>after a typo or string replace, but it seems LispWorks' reaction
>is a little harsh.
>  
>

On LWW 4.3.7 you just get a stack overflow, which one could expect.  It 
is probably
a MacOS thing, I vaguely remember something a while on this list about 
stack overflow
problems on LWM.

Wade


Re: nasty bug with defstruct

Unable to parse email body. Email id is 4644

Re: nasty bug with defstruct

That's good news! If I ever find out what was the key to the screen
garbage, I'll be sure to let someone know.

On 17/10/05, Martin Simmons <martin@lispworks.com> wrote:
> >>>>> On Sat, 15 Oct 2005 15:19:04 -0400, Joshua Taylor <joshuaaaron@gmail.com> said:
>
>   Joshua> Hello all, If I have the following in a file
>
>   Joshua> (defstruct FOO)
>   Joshua> (defstruct (FOO (:include FOO)))
>
>   Joshua> and try to evaluate it, or compile and load it, Lispworks dies
>   Joshua> immediately. Obviously the code is bad, and I ended up with it
>   Joshua> after a typo or string replace, but it seems LispWorks' reaction
>   Joshua> is a little harsh.
>
>   Joshua> It also would seem to corrupt some memory in other places
>   Joshua> too (not sure if this would be a MacOS thing, or a Lispworks thing),
>   Joshua> as the first several times I did this, my display became garbled.
>   Joshua> I haven't been able to reproduce that in a smaller example yet though.
>   Joshua> You can see that here:
>
>   Joshua> http://www.cs.rpi.edu/~tayloj/corruption.png
>   Joshua> (I covered some things after the fact, but clearly
>   Joshua> marked those, everything else you see is what
>   Joshua> happened at the crash)
>
> Wow, that's messy!  I'm not sure how the screen gets corrupted, but I've fixed
> the LW devel code to detect the circularity before crashing.
>
> --
> Martin Simmons                              Email: martin@lispworks.com
> LispWorks Ltd, St John's Innovation Centre    TEL:   +44 1223 421860
> Cowley Road, Cambridge CB4 0WS, England.      FAX:   +44 870 2206189
>


--
=====================
Joshua Taylor
tayloj@rpi.edu


Updated at: 2020-12-10 08:50 UTC