]> git.eshelyaron.com Git - emacs.git/commitdiff
Port alignment verification to x86 --with-wide-int
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 8 Jun 2018 15:08:03 +0000 (08:08 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 8 Jun 2018 15:09:00 +0000 (08:09 -0700)
Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-06/msg00238.html
* src/lisp.h (struct Lisp_Symbol, union vectorlike_header)
(struct Lisp_Cons, struct Lisp_String):
Do not check alignment if !USE_LSB_TAG, as alignment is
needed only if we are tagging the low-order bits.

src/lisp.h

index 10012b29db14401086d18c83a9a7f302862a5948..293cf2783c3709cb2d9783b892746cb22b9c9635 100644 (file)
@@ -785,7 +785,7 @@ struct Lisp_Symbol
     GCALIGNED_UNION
   } u;
 };
-verify (alignof (struct Lisp_Symbol) % GCALIGNMENT == 0);
+verify (!USE_LSB_TAG || alignof (struct Lisp_Symbol) % GCALIGNMENT == 0);
 
 /* Declare a Lisp-callable function.  The MAXARGS parameter has the same
    meaning as in the DEFUN macro, and is used to construct a prototype.  */
@@ -898,7 +898,7 @@ union vectorlike_header
     ptrdiff_t size;
     GCALIGNED_UNION
   };
-verify (alignof (union vectorlike_header) % GCALIGNMENT == 0);
+verify (!USE_LSB_TAG || alignof (union vectorlike_header) % GCALIGNMENT == 0);
 
 INLINE bool
 (SYMBOLP) (Lisp_Object x)
@@ -1259,7 +1259,7 @@ struct Lisp_Cons
     GCALIGNED_UNION
   } u;
 };
-verify (alignof (struct Lisp_Cons) % GCALIGNMENT == 0);
+verify (!USE_LSB_TAG || alignof (struct Lisp_Cons) % GCALIGNMENT == 0);
 
 INLINE bool
 (NILP) (Lisp_Object x)
@@ -1381,7 +1381,7 @@ struct Lisp_String
     GCALIGNED_UNION
   } u;
 };
-verify (alignof (struct Lisp_String) % GCALIGNMENT == 0);
+verify (!USE_LSB_TAG || alignof (struct Lisp_String) % GCALIGNMENT == 0);
 
 INLINE bool
 STRINGP (Lisp_Object x)