[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fatal error in bootstrap-emacs on Mac OS 10.3.2
From: |
Nozomu Ando |
Subject: |
Re: fatal error in bootstrap-emacs on Mac OS 10.3.2 |
Date: |
Wed, 28 Jan 2004 07:52:14 +0900 (JST) |
I think I have found a bug of my code in unexemacosx.c.
I apologize.
On unexmacosx.c:189, the comment of unexec_copy() is not correct.
unexec_copy(dest, src, count) copies too many bytes if count is
not a multiple of 1024.
So unrelocate() (which uses unexec_copy()) may crobber the dumped
emacs.
I think it will be better to correct the body of the function
unexec_copy() to match with its comment.
Please consider the following patch.
(I heard this solved Marc-Antoine's problem, thanks!)
Regards,
Nozomu Ando <address@hidden>
---
Index: src/unexmacosx.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/unexmacosx.c,v
retrieving revision 1.8
diff -u -u -r1.8 unexmacosx.c
--- src/unexmacosx.c 31 Oct 2003 19:42:45 -0000 1.8
+++ src/unexmacosx.c 27 Jan 2004 22:34:19 -0000
@@ -203,7 +203,10 @@
while (count > 0)
{
- bytes_read = read (infd, buf, UNEXEC_COPY_BUFSZ);
+ bytes_read = count;
+ if (bytes_read > UNEXEC_COPY_BUFSZ)
+ bytes_read = UNEXEC_COPY_BUFSZ;
+ bytes_read = read (infd, buf, bytes_read);
if (bytes_read <= 0)
return 0;
if (write (outfd, buf, bytes_read) != bytes_read)