From 3a8d08994a8df44a9020a25b3917e02c6da81465 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Fri, 10 Jan 2003 20:08:54 +0000 Subject: [PATCH] (pure_alloc): Correct alignment for Lisp_Floats. --- src/ChangeLog | 5 +++++ src/alloc.c | 9 +++++++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 66f295b0932..d10f6e52b19 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2003-01-10 Andreas Schwab + + * alloc.c (pure_alloc): Correct alignment for Lisp_Floats. + Reported by Berthold Gunreben . + 2003-01-10 Dave Love * composite.c (syms_of_composite): Make composition_hash_table diff --git a/src/alloc.c b/src/alloc.c index b884bfabfb0..47885c67534 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -1,5 +1,5 @@ /* Storage allocation and gc for GNU Emacs Lisp interpreter. - Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000, 2001, 2002 + Copyright (C) 1985, 86, 88, 93, 94, 95, 97, 98, 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. This file is part of GNU Emacs. @@ -3844,7 +3844,12 @@ pure_alloc (size, type) #else alignment = sizeof (struct Lisp_Float); #endif - pure_bytes_used = ALIGN (pure_bytes_used, alignment); + /* Make sure beg + pure_bytes_used is correctly aligned for a + Lisp_Float, which might need stricter alignment than + EMACS_INT. */ + pure_bytes_used + = (ALIGN ((EMACS_UINT) (beg + pure_bytes_used), alignment) + - (EMACS_UINT) beg); } nbytes = ALIGN (size, sizeof (EMACS_INT)); -- 2.11.4.GIT