emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-25 23c3caf: Avoid assertion violation in unbind_to


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-25 23c3caf: Avoid assertion violation in unbind_to
Date: Sat, 26 Dec 2015 10:43:09 +0000

branch: emacs-25
commit 23c3caf6025f1cbe37781ceb359fac2c67268f45
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Avoid assertion violation in unbind_to
    
    * src/eval.c (unbind_to) <SPECPDL_LET>: Avoid assertion violation
    if we get here with an object that is not a symbol.  (Bug#14412)
---
 src/eval.c |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/eval.c b/src/eval.c
index d04796a..571681c 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -3196,11 +3196,15 @@ unbind_to (ptrdiff_t count, Lisp_Object value)
          { /* If variable has a trivial value (no forwarding), we can
               just set it.  No need to check for constant symbols here,
               since that was already done by specbind.  */
-           struct Lisp_Symbol *sym = XSYMBOL (specpdl_symbol (specpdl_ptr));
-           if (sym->redirect == SYMBOL_PLAINVAL)
+           Lisp_Object symbol = specpdl_symbol (specpdl_ptr);
+           if (SYMBOLP (symbol))
              {
-               SET_SYMBOL_VAL (sym, specpdl_old_value (specpdl_ptr));
-               break;
+               struct Lisp_Symbol *sym = XSYMBOL (symbol);
+               if (sym->redirect == SYMBOL_PLAINVAL)
+                 {
+                   SET_SYMBOL_VAL (sym, specpdl_old_value (specpdl_ptr));
+                   break;
+                 }
              }
            else
              { /* FALLTHROUGH!!



reply via email to

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