]> git.eshelyaron.com Git - emacs.git/commitdiff
add stack sanity check
authorAndrea Corallo <akrl@sdf.org>
Sun, 13 Oct 2019 18:22:14 +0000 (20:22 +0200)
committerAndrea Corallo <akrl@sdf.org>
Wed, 1 Jan 2020 10:37:56 +0000 (11:37 +0100)
lisp/emacs-lisp/comp.el

index b2eee68b3ffde47e379c340a91ffbba7b05dc791..adda0537a6e1ce3ed0db7f17f2bd44bb31225e7a 100644 (file)
@@ -745,7 +745,8 @@ the annotation emission."
                (cdr insn))))
     (comp-op-case
       (TAG
-       (comp-lap-to-limple-bb arg))
+       ;; Paranoically sanity check stack depth.
+       (cl-assert (= (cddr insn) (comp-limplify-sp comp-pass))))
       (byte-stack-ref
        (comp-copy-slot (- (comp-sp) arg 1)))
       (byte-varref