]> git.eshelyaron.com Git - emacs.git/commitdiff
* src/bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 27 May 2014 23:48:35 +0000 (19:48 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 27 May 2014 23:48:35 +0000 (19:48 -0400)
relocated from under us.

src/ChangeLog
src/bytecode.c

index 959f29a267507d272bc824d1c638f12ead4542ed..f88a1b31dbab43a07f82d0207f1f8d0795aeb7df 100644 (file)
@@ -1,3 +1,8 @@
+2014-05-27  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't
+       relocated from under us.
+
 2014-05-27  Fabrice Popineau  <fabrice.popineau@gmail.com>
 
        * Makefile.in (C_HEAP_SWITCH): Get the predefined heap size from
index f489c74a1440d1649918b2f7a91ad7de222bcd5d..ca6681f21e95d0dbde078cd498534dfc824e51d1 100644 (file)
@@ -388,7 +388,11 @@ unmark_byte_stack (void)
 \f
 /* 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.  */