Subject: Re: bug#15405: 24.3; #[] freezes emacs

From: Dmitry Antipov <[email-masked]>
Date: Thu, 26 Sep 2013 01:50:23 +0400

On 09/25/2013 11:09 PM, Barry OReilly wrote:

> How's this?

OK for me, except...

> @@ -3132,6 +3132,8 @@ usage: (vector &rest OBJECTS)  */)
>   void
>   make_byte_code (struct Lisp_Vector *v)
>   {
> +  /* Don't allow the global zero_vector to become a byte code object. */
> +  eassert(v->header.size!=0);

Since v->header.size is signed (ptrdiff_t), I would suggest

eassert (v->header.size > 0)

for the better catch of bogus values.

Thanks,
Dmitry