emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs-25 57bd9a3: Avoid assertion violations in compact_fo


From: Eli Zaretskii
Subject: [Emacs-diffs] emacs-25 57bd9a3: Avoid assertion violations in compact_font_cache_entry
Date: Tue, 29 Dec 2015 18:07:20 +0000

branch: emacs-25
commit 57bd9a35efafd37a6888e69be28f54d49affcd30
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>

    Avoid assertion violations in compact_font_cache_entry
    
    * src/alloc.c (compact_font_cache_entry): Don't use VECTORP to
    avoid assertion violation in ASIZE.  (Bug#22263)
---
 src/alloc.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/alloc.c b/src/alloc.c
index 23ddd83..fe55cde 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -5346,7 +5346,10 @@ compact_font_cache_entry (Lisp_Object entry)
       /* Consider OBJ if it is (font-spec . [font-entity font-entity ...]).  */
       if (CONSP (obj) && GC_FONT_SPEC_P (XCAR (obj))
          && !VECTOR_MARKED_P (GC_XFONT_SPEC (XCAR (obj)))
-         && VECTORP (XCDR (obj)))
+         /* Don't use VECTORP here, as that calls ASIZE, which could
+            hit assertion violation during GC.  */
+         && (VECTORLIKEP (XCDR (obj))
+             && ! (gc_asize (XCDR (obj)) & PSEUDOVECTOR_FLAG)))
        {
          ptrdiff_t i, size = gc_asize (XCDR (obj));
          Lisp_Object obj_cdr = XCDR (obj);



reply via email to

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