summaryrefslogtreecommitdiff
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2014-05-27 19:48:35 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2014-05-27 19:48:35 -0400
commit9da43ddc9d3e5031d43bf0f5e73ec60b42af2461 (patch)
tree9709cee8741e9b0eafaf0fc9fe172cc9d5f7dd55 /src/bytecode.c
parent587fd086a045f715932f886ecf31015932464ce6 (diff)
downloademacs-9da43ddc9d3e5031d43bf0f5e73ec60b42af2461.tar.gz
* src/bytecode.c (FETCH) [BYTE_CODE_SAFE]: Check the bytecode wasn't
relocated from under us.
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c4
1 files changed, 4 insertions, 0 deletions
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. */