Fix missing type checks before specbind
authorMattias Engdegård <mattiase@acm.org>
Sat, 3 Aug 2024 17:08:39 +0000 (19:08 +0200)
committerMattias Engdegård <mattiase@acm.org>
Sat, 3 Aug 2024 17:32:23 +0000 (19:32 +0200)
commite50d597f4508c6ef333c5616a2a924360437ba55
tree59a27ba996f5839962268d9e336bdb2520a50980
parent8d073823c61017c581a18853c89ec84432018d60
Fix missing type checks before specbind

This fixes bugs that crashed Emacs when the Lisp interpreter was fed
bad code.

* src/eval.c (FletX, Flet, internal_lisp_condition_case)
(funcall_lambda): Hoist symbol-with-pos elimination and type checks to a
dominating position for efficiency.  This also plugs at least two typing
holes. (Mea culpa.)
* test/src/eval-tests.el (eval-bad-specbind): New regression test.
src/eval.c
test/src/eval-tests.el