[Top][All Lists]

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

alignment problem allocating pure_float

From: b.gunreben
Subject: alignment problem allocating pure_float
Date: Fri, 10 Jan 2003 16:25:17 +0100

when comiling emacs on hppa-linux-gnu, I had the following error: 
> LC_ALL=C ./temacs -batch -l loadup dump 
Loading term/tty-colors... 
make[1]: *** [emacs] Bus error 
I found, that there is a problem in src/alloc.c, where pure_bytes_used becomes 
for pure_floats, but PUREBEG is only int alinged. So the resulting adress after 
aligning pure_bytes_used to pure_float is still int aligned. 
The emacs version I used is 21.2. I could fix this problem with the following 
# cat alloc_pure_float.patch  
--- src/alloc.c 2003/01/02 16:39:01     1.1 
+++ src/alloc.c 2003/01/02 16:41:01 
@@ -3802,7 +3802,7 @@ 
       alignment = sizeof (struct Lisp_Float); 
-      pure_bytes_used = ALIGN (pure_bytes_used, alignment); 
+      pure_bytes_used = (ALIGN (pure_bytes_used + (long) PUREBEG, alignment)) 
- (long) 
   nbytes = ALIGN (size, sizeof (EMACS_INT)); 
Please fix possible wrong linebreaks before applying. I can also send this 
patch as 
attachement if needed. 
Bequemer und billiger - SMS mit FreeMail verschicken! Mehr Information
unter: http://freemail.web.de/features/?mc=021147

reply via email to

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