aboutsummaryrefslogtreecommitdiffstats
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorNickolas Lloyd2016-12-23 16:21:19 -0500
committerNickolas Lloyd2016-12-23 16:21:19 -0500
commita35c6fdc42bb31f5e8bf743c94366341ad700595 (patch)
treede6449763dbc531c4cfb568f067f59833df6c763 /src/bytecode.c
parenta810d5945840d0e8565fa2c90e1a9beef7f5bb30 (diff)
downloademacs-a35c6fdc42bb31f5e8bf743c94366341ad700595.tar.gz
emacs-a35c6fdc42bb31f5e8bf743c94366341ad700595.zip
; Fix a possible bug with JIT-compiled functions in the call stack
* src/bytecode-jit.c (jit_byte_code__, jit_exec): Insert entry into `byte_stack_list' from `jit_exec' instead of `jit_byte_code__'. It seems like this would be needed for proper stack unwinding in `unwind_to_catch'. * src/bytecode.c (relocate_byte_stack) [HAVE_LIBJIT]: Skip entries in `byte_stack_list' with no associated bytecode stack.
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 6567039765d..26860daec10 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -66,6 +66,10 @@ relocate_byte_stack (struct byte_stack *stack)
66{ 66{
67 for (; stack; stack = stack->next) 67 for (; stack; stack = stack->next)
68 { 68 {
69#ifdef HAVE_LIBJIT
70 if (!stack->byte_string_start)
71 continue;
72#endif
69 if (stack->byte_string_start != SDATA (stack->byte_string)) 73 if (stack->byte_string_start != SDATA (stack->byte_string))
70 { 74 {
71 ptrdiff_t offset = stack->pc - stack->byte_string_start; 75 ptrdiff_t offset = stack->pc - stack->byte_string_start;