From: Stefan Monnier Date: Tue, 27 May 2014 23:48:35 +0000 (-0400) Subject: * src/bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't X-Git-Tag: emacs-25.0.90~2612^2~709^2~870 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9da43ddc9d3e5031d43bf0f5e73ec60b42af2461;p=emacs.git * src/bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't relocated from under us. --- diff --git a/src/ChangeLog b/src/ChangeLog index 959f29a2675..f88a1b31dba 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2014-05-27 Stefan Monnier + + * bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't + relocated from under us. + 2014-05-27 Fabrice Popineau * Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from diff --git a/src/bytecode.c b/src/bytecode.c index f489c74a144..ca6681f21e9 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -388,7 +388,11 @@ unmark_byte_stack (void) /* Fetch the next byte from the bytecode stream. */ +#ifdef BYTE_CODE_SAFE +#define FETCH (eassert (stack.byte_string_start == SDATA (stack.byte_string)), *stack.pc++) +#else #define FETCH *stack.pc++ +#endif /* Fetch two bytes from the bytecode stream and make a 16-bit number out of them. */