diff options
| author | Dmitry Antipov | 2014-08-26 10:25:59 +0400 |
|---|---|---|
| committer | Dmitry Antipov | 2014-08-26 10:25:59 +0400 |
| commit | ebd31792b292f63f09efa498b5df73bf86107259 (patch) | |
| tree | 8cd196b0c4c03a3e76e00ed6c0fa010af49d3aea /lisp | |
| parent | 940ac42ae3d5c5c5d80f984278446ab34c0bb26a (diff) | |
| download | emacs-ebd31792b292f63f09efa498b5df73bf86107259.tar.gz emacs-ebd31792b292f63f09efa498b5df73bf86107259.zip | |
Handle C stack overflow caused by too nested Lisp evaluation.
* configure.ac: Check for sigaltstack and related sigaction
support. Unconditionally check for sigsetjmp and siglongjmp.
(HAVE_STACK_OVERFLOW_HANDLING): Define if we can support it.
* src/lisp.h (toplevel) [HAVE_STACK_OVERFLOW_HANDLING]: Declare
siglongjmp point to transfer control from SIGSEGV handler.
* src/keyboard.c (return_to_command_loop, recover_top_level_message)
[HAVE_STACK_OVERFLOW_HANDLING]: New variables.
(regular_top_level_message): New variable.
(command_loop) [HAVE_STACK_OVERFLOW_HANDLING]: Handle non-local
exit from SIGSEGV handler and adjust message displayed by Vtop_level
if appropriate.
(syms_of_keyboard): DEFVAR Vtop_level_message and initialize
new variables described above.
* src/sysdep.c [HAVE_SYS_RESOURCE_H]: Include sys/resource.h as such.
(stack_grows_down, sigsegv_stack, handle_sigsegv)
[HAVE_STACK_OVERFLOW_HANDLING]: New variables and function.
(init_sigsegv): New function.
(init_signals): Use it.
* lisp/startup.el (normal-top-level): Use top-level-message.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/startup.el | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 65a59f4da6d..12d283e7120 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2014-08-26 Dmitry Antipov <dmantipov@yandex.ru> | ||
| 2 | |||
| 3 | * startup.el (normal-top-level): Use top-level-message. | ||
| 4 | |||
| 1 | 2014-08-25 Lars Magne Ingebrigtsen <larsi@gnus.org> | 5 | 2014-08-25 Lars Magne Ingebrigtsen <larsi@gnus.org> |
| 2 | 6 | ||
| 3 | * net/shr.el (shr-copy-url): Encode copied URL to avoid getting | 7 | * net/shr.el (shr-copy-url): Encode copied URL to avoid getting |
diff --git a/lisp/startup.el b/lisp/startup.el index 144d732272f..1d5ae250505 100644 --- a/lisp/startup.el +++ b/lisp/startup.el | |||
| @@ -497,7 +497,7 @@ It sets `command-line-processed', processes the command-line, | |||
| 497 | reads the initialization files, etc. | 497 | reads the initialization files, etc. |
| 498 | It is the default value of the variable `top-level'." | 498 | It is the default value of the variable `top-level'." |
| 499 | (if command-line-processed | 499 | (if command-line-processed |
| 500 | (message "Back to top level.") | 500 | (message top-level-message) |
| 501 | (setq command-line-processed t) | 501 | (setq command-line-processed t) |
| 502 | 502 | ||
| 503 | ;; Look in each dir in load-path for a subdirs.el file. If we | 503 | ;; Look in each dir in load-path for a subdirs.el file. If we |