From: Eli Zaretskii <eliz@gnu.org>
To: martin rudalics <rudalics@gmx.at>
Cc: emacs-devel@gnu.org
Subject: Re: End of file while generating loaddefs.el
Date: Sat, 21 Nov 2015 13:57:16 +0200 [thread overview]
Message-ID: <83io4v4lb7.fsf@gnu.org> (raw)
In-Reply-To: <56505448.9090307@gmx.at>
> Date: Sat, 21 Nov 2015 12:23:52 +0100
> From: martin rudalics <rudalics@gmx.at>
> CC: emacs-devel@gnu.org
>
> Do you still have the snippet that caused problems in your case?
Yes, I do.
> How could null bytes possibly get into that file
I don't know. Some bug, obviously, but that's all I can say. I also
know it happened 7 days ago, because that's the time stamp of the
file.
> and why did they cause an end of file exception during parsing?
That's easy. This is the guts of autoload-read-section-header:
(while (looking-at generate-autoload-section-continuation)
(forward-line 1))
(setq string (buffer-substring beginning (point)))
(with-current-buffer (get-buffer-create " *autoload*")
(erase-buffer)
(insert string)
(goto-char (point-min))
(while (search-forward generate-autoload-section-continuation nil t)
(replace-match " "))
(goto-char (point-min))
(read (current-buffer))))))
The null bytes cause the first while loop to stop prematurely, and
then buffer-substring copies only part of a sexp into a temporary
buffer. We then try to read an incomplete sexp from that buffer and
hit the end of the buffer before the sexp ends.
> And why does no one else have such problems?
I don't know, because I don't know what bug caused those null bytes to
appear in the first place.
next prev parent reply other threads:[~2015-11-21 11:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-17 17:40 End of file while generating loaddefs.el Eli Zaretskii
2015-11-18 7:50 ` martin rudalics
2015-11-18 17:29 ` Eli Zaretskii
2015-11-19 8:13 ` martin rudalics
2015-11-19 16:15 ` Eli Zaretskii
2015-11-19 16:33 ` John Wiegley
2015-11-20 8:23 ` martin rudalics
2015-11-20 8:38 ` Eli Zaretskii
2015-11-20 9:46 ` David Kastrup
2015-11-20 14:50 ` Eli Zaretskii
2015-11-20 21:10 ` Eli Zaretskii
2015-11-21 8:33 ` martin rudalics
2015-11-21 8:49 ` Eli Zaretskii
2015-11-21 11:23 ` martin rudalics
2015-11-21 11:33 ` David Kastrup
2015-11-21 11:59 ` Eli Zaretskii
2015-11-21 11:57 ` Eli Zaretskii [this message]
2015-11-21 15:29 ` Juanma Barranquero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83io4v4lb7.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=rudalics@gmx.at \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.