* alignment problem allocating pure_float
@ 2003-01-10 15:25 b.gunreben
2003-01-12 11:54 ` Richard Stallman
0 siblings, 1 reply; 2+ messages in thread
From: b.gunreben @ 2003-01-10 15:25 UTC (permalink / raw)
Cc: b.gunreben
Hi,
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 aligned
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 diff:
# 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 @@
#else
alignment = sizeof (struct Lisp_Float);
#endif
- pure_bytes_used = ALIGN (pure_bytes_used, alignment);
+ pure_bytes_used = (ALIGN (pure_bytes_used + (long) PUREBEG, alignment)) - (long)
PUREBEG;
}
nbytes = ALIGN (size, sizeof (EMACS_INT));
Please fix possible wrong linebreaks before applying. I can also send this patch as
attachement if needed.
Berthold
______________________________________________________________________________
Bequemer und billiger - SMS mit FreeMail verschicken! Mehr Information
unter: http://freemail.web.de/features/?mc=021147
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: alignment problem allocating pure_float
2003-01-10 15:25 alignment problem allocating pure_float b.gunreben
@ 2003-01-12 11:54 ` Richard Stallman
0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2003-01-12 11:54 UTC (permalink / raw)
Cc: emacs-devel
Thanks for tracking down the problem.
Your fix seems correct.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-01-12 11:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-01-10 15:25 alignment problem allocating pure_float b.gunreben
2003-01-12 11:54 ` Richard Stallman
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.