diff options
| author | Noam Postavsky | 2018-02-15 22:13:51 -0500 |
|---|---|---|
| committer | Noam Postavsky | 2018-02-16 22:13:34 -0500 |
| commit | c352434ab89617b48c7c1f29342a22e5a5685504 (patch) | |
| tree | 0a6e535935d8f9a4a2691b30f7324573d48068d3 /src/coding.c | |
| parent | 593bbdaf0b890924e9d10918ba6de206bddc2eb6 (diff) | |
| download | emacs-c352434ab89617b48c7c1f29342a22e5a5685504.tar.gz emacs-c352434ab89617b48c7c1f29342a22e5a5685504.zip | |
Avoid memory corruption with specpdl overflow + edebug (Bug#30481)
If grow_specpdl fails due to outgrowing max_specpdl_size, it will
signal an error *before* growing the specpdl array. Therefore, when
handling the signal, specpdl_ptr points past the end of the specpdl
array and any further use of of specpdl before unwinding (e.g., if
edebug binds signal-hook-function) will cause memory corruption.
* src/eval.c (signal_or_quit): Don't call `signal-hook-function' if
the specpdl_ptr is already past the end of the specpdl array.
* test/src/eval-tests.el (eval-tests--exceed-specbind-limit)
(eval-exceed-specbind-with-signal-hook): New test & helper function.
Diffstat (limited to 'src/coding.c')
0 files changed, 0 insertions, 0 deletions