From a90803a4d1bc47fcfc3b9a3af519cd8441bd92de Mon Sep 17 00:00:00 2001 From: Andrea Corallo Date: Sun, 13 Oct 2019 20:22:14 +0200 Subject: [PATCH] add stack sanity check --- lisp/emacs-lisp/comp.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index b2eee68b3ff..adda0537a6e 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -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 -- 2.39.5