Subject: Re: bug#45433: 28.0.50; byte/native-compiling ivy and ox-publish possibly miscompiled

From: Mauricio Collares <[email-masked]>
Date: Tue, 05 Jan 2021 09:24:28 -0300

Andrea Corallo <[email-masked]> writes:
>
> Hi Mauricio,
>
> thanks for reducing, I can reproduce this version too.

Hi Andrea,

Very glad to hear this bug is reproducible, thanks a lot for taking a
look at it!

The esxml-query example (if it has the same root cause) is interesting
because of the byte-compiler assertion failure. To reproduce it, you can
follow the same steps as before with this in ~/ivy.el:

(defvar esxml--css-selector-token-matchers
  (let ((v1 "a")
        (v2 "a")
        (v3 "a")
        (v4 "a")
        (v5 "a")
        (v6 "a")
        (v7 "a")
        (v8 "a")
        (v9 "a")
        (v10 "a")
        (v11 "a")
        (v12 "a")
        (v13 "a"))
    `((function . ,(identity v13)))))

Running the same three commands as before then fails with:

Debugger entered--Lisp error: (error "binding stack not balanced (serious byte compiler ...")
  byte-code("\306\211\211\211\211\211\211\211\211\211\211\211\211\30\31\32\33\34\35\36\10\36\11\36\n\36\13\36\f\36\n\36\16\307\10.\nBC\207" [v13 v12 v11 v10 v9 v8 "a" function v7 v6 v5 v4 v3 v2 v1] 13)
  (defvar esxml--css-selector-token-matchers (byte-code "\306\211\211\211\211\211\211\211\211\211\211\211\211\30\31\32\33\34\35\36\10\36\11\36\n\36\13\36\f\36\n\36\16\307\10.\nBC\207" [v13 v12 v11 v10 v9 v8 "a" function v7 v6 v5 v4 v3 v2 v1] 13))

Best,
Mauricio