[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 5252c45: Initialise unread buffer
From: |
Lars Ingebrigtsen |
Subject: |
Re: master 5252c45: Initialise unread buffer |
Date: |
Sun, 19 Sep 2021 16:56:02 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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