Harden exec_byte_code against redefining 'error'
Problem discovered by configuring with --enable-gcc-warnings on Ubuntu 17.10 x86-64 with gcc (Ubuntu 7.2.0-8ubuntu3). * src/bytecode.c (exec_byte_code): Call the C error function instead of the Lisp one, so that the Emacs interpreter does not go haywire if the user redefines the Lisp error function.
This commit is contained in:
parent
700f74e4c8
commit
ac64fdb248
1 changed files with 2 additions and 4 deletions
|
@ -1346,10 +1346,8 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
|
||||||
/* Actually this is Bstack_ref with offset 0, but we use Bdup
|
/* Actually this is Bstack_ref with offset 0, but we use Bdup
|
||||||
for that instead. */
|
for that instead. */
|
||||||
/* CASE (Bstack_ref): */
|
/* CASE (Bstack_ref): */
|
||||||
call3 (Qerror,
|
error ("Invalid byte opcode: op=%d, ptr=%"pD"d",
|
||||||
build_string ("Invalid byte opcode: op=%s, ptr=%d"),
|
op, pc - 1 - bytestr_data);
|
||||||
make_number (op),
|
|
||||||
make_number (pc - 1 - bytestr_data));
|
|
||||||
|
|
||||||
/* Handy byte-codes for lexical binding. */
|
/* Handy byte-codes for lexical binding. */
|
||||||
CASE (Bstack_ref1):
|
CASE (Bstack_ref1):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue