summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/package.el
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2015-11-16 23:08:54 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2015-11-16 23:09:28 -0800
commit54beeef1180e5ff2adb6797b6b4572e71c882e95 (patch)
treebe939c06ccdeac25775f22790a2c83d7fd0eeaf0 /lisp/emacs-lisp/package.el
parent1721600d2463bacd13faa2c7613b7897a84d1099 (diff)
downloademacs-54beeef1180e5ff2adb6797b6b4572e71c882e95.tar.gz
emacs-54beeef1180e5ff2adb6797b6b4572e71c882e95.tar.bz2
emacs-54beeef1180e5ff2adb6797b6b4572e71c882e95.zip
eval_sub followed dangling pointer when debugging
Problem reported by Pip Cet (Bug#21245). This bug could occur in eval_sub if the C compiler reused storage associated with the ‘argvals’ local after ‘argvals’ went out of scope, and if the Elisp debugger stopped on Elisp function exit and accessed ‘argvals’. It could also occur if a variadic function was called with so many arguments (over 2048 args on x86-64) that SAFE_ALLOCA_LISP called malloc, then SAFE_FREE freed the arguments, then the memory manager used the storage for other purposes, then the debugger accessed the arguments. * src/eval.c (eval_sub): Declare ‘argvals’ at top level of function body. Simplify local decls. When allocating args via SAFE_ALLOCA, call debugger before invoking SAFE_FREE, as the debugger needs access to the args. (eval_sub, apply_lambda): Rework to avoid need for set_backtrace_debug_on_exit hack. This is cleaner, and should work better with buggy custom debuggers.
Diffstat (limited to 'lisp/emacs-lisp/package.el')
0 files changed, 0 insertions, 0 deletions