emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs trunk crash


From: Eli Zaretskii
Subject: Re: Emacs trunk crash
Date: Wed, 25 Mar 2015 22:38:07 +0200

> From: Fabrice Popineau <address@hidden>
> Date: Tue, 24 Mar 2015 22:10:16 +0100
> Cc: Emacs developers <address@hidden>
> 
> The file is attached.
> Put the point at the beginning of the second line on the bracket
> and M-: (read (current-buffer))

Try the patch below.  It solves the crash with the file you sent, but
the question is: does it also solve your real-life use case?

diff --git a/src/lread.c b/src/lread.c
index ae17529..050e43e 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -3280,7 +3280,7 @@ BUFFER is the buffer to evaluate (nil means use current 
buffer).
     {
     case Lisp_Vectorlike:
       {
-       ptrdiff_t i, length = 0;
+       ptrdiff_t i = 0, length = 0;
        if (BOOL_VECTOR_P (subtree))
          return subtree;               /* No sub-objects anyway.  */
        else if (CHAR_TABLE_P (subtree) || SUB_CHAR_TABLE_P (subtree)
@@ -3295,7 +3295,9 @@ BUFFER is the buffer to evaluate (nil means use current 
buffer).
             behavior.  */
          wrong_type_argument (Qsequencep, subtree);
 
-       for (i = 0; i < length; i++)
+       if (SUB_CHAR_TABLE_P (subtree))
+         i = 2;
+       for ( ; i < length; i++)
          SUBSTITUTE (AREF (subtree, i),
                      ASET (subtree, i, true_value));
        return subtree;



reply via email to

[Prev in Thread] Current Thread [Next in Thread]