From: Lars Ingebrigtsen <larsi@gnus.org>
To: emacs-devel@gnu.org
Cc: "Mattias Engdegård" <mattiase@acm.org>
Subject: Re: master 5252c45: Initialise unread buffer
Date: Sun, 19 Sep 2021 16:56:02 +0200 [thread overview]
Message-ID: <87pmt4obr1.fsf@gnus.org> (raw)
In-Reply-To: <87lf3spro4.fsf@gnus.org> (Lars Ingebrigtsen's message of "Sun, 19 Sep 2021 16:26:51 +0200")
Lars Ingebrigtsen <larsi@gnus.org> writes:
> Mattias Engdegård <mattiase@savannah.gnu.org> writes:
>
>> The reader has an extra 1-char unread buffer that was incorrectly
>> initialised to 0, which means that the first character read would
>> always be NUL. As this is often the code that looks for the
>> lexical-binding cookie, the first loaded source module would be
>> treated as dynamically bound. During bootstrapping this is loadup.el
>> and so its local variables got dumped into the global environment.
>
> Wow. How did you manage to debug this? :-)
But it seems like this leads to random breakages:
Debugger entered--Lisp error: (error "Invalid byte opcode: op=0, ptr=6")
signal(error ("Invalid byte opcode: op=0, ptr=6"))
apply(signal (error ("Invalid byte opcode: op=0, ptr=6")))
(setq value-198 (apply fn-196 args-197))
This is when evalling the body of this test:
(ert-deftest eval-tests-accept-empty-optional-rest ()
"Check that Emacs accepts empty &optional and &rest arglists.
Bug#24912."
(dolist (args '((&optional) (&rest) (&optional &rest)
(&optional &rest a) (&optional a &rest)))
(let ((fun `(lambda ,args 'ok)))
(ert-info ("eval")
(should (eq (funcall (eval fun t)) 'ok)))
(ert-info ("byte comp check")
(byte-compile-check-lambda-list args))
(ert-info ("bytecomp")
(let ((byte-compile-debug t))
(should (eq (funcall (byte-compile fun)) 'ok))))))
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2021-09-19 14:56 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210919142251.2698.98689@vcs0.savannah.gnu.org>
[not found] ` <20210919142252.B0B1520ABE@vcs0.savannah.gnu.org>
2021-09-19 14:26 ` master 5252c45: Initialise unread buffer Lars Ingebrigtsen
2021-09-19 14:56 ` Lars Ingebrigtsen [this message]
2021-09-19 15:39 ` Mattias Engdegård
2021-09-19 15:41 ` Lars Ingebrigtsen
2021-09-20 10:16 ` Mattias Engdegård
2021-09-20 10:30 ` tomas
2021-09-20 14:44 ` Lars Ingebrigtsen
2021-10-01 19:59 ` Stefan Monnier
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmt4obr1.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=emacs-devel@gnu.org \
--cc=mattiase@acm.org \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).