]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/lread.c (bytecode_from_rev_list): Fix assertion failure
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 4 Feb 2024 18:51:13 +0000 (13:51 -0500)
committerEshel Yaron <me@eshelyaron.com>
Wed, 7 Feb 2024 10:50:49 +0000 (11:50 +0100)
The assertion failure was raised at lread.c:411 during the
`lread-invalid-bytecodes` test in `test/src/lread-tests.el`.
I suspect we could remove the assertion instead.

(cherry picked from commit 7d3c3cad9392d3f8e59f85522053c249aff062e5)

src/lread.c

index b1b109315f9a87dcce352b8c9fe691d10bb978fd..b5eeb55bb705d36aad274464aefb7fbfc8b2a8aa 100644 (file)
@@ -3496,7 +3496,7 @@ bytecode_from_rev_list (Lisp_Object elems, Lisp_Object readcharfun)
   Lisp_Object *vec = XVECTOR (obj)->contents;
   ptrdiff_t size = ASIZE (obj);
 
-  if (size >= COMPILED_CONSTANTS)
+  if (infile && size >= COMPILED_CONSTANTS)
     {
       /* Always read 'lazily-loaded' bytecode (generated by the
          `byte-compile-dynamic' feature prior to Emacs 30) eagerly, to