]> git.eshelyaron.com Git - emacs.git/commit
Support recovery from C stack overflow on MS-Windows
authorEli Zaretskii <eliz@gnu.org>
Sat, 8 Aug 2015 08:12:06 +0000 (11:12 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 8 Aug 2015 08:12:06 +0000 (11:12 +0300)
commit7afa4f300b9dc38bf3f33b18fa83bfe35e21a479
tree032ab5a75ec1ff00cee51ffe6216fceb16a53e6c
parent35656b6fa473a4c422875a61d24ebb736c1be4e9
Support recovery from C stack overflow on MS-Windows

* src/w32fns.c (w32_reset_stack_overflow_guard)
(stack_overflow_handler): New functions for handling C stack
overflow exceptions.
(my_exception_handler): Handle EXCEPTION_STACK_OVERFLOW exceptions
specially, and zero out except_addr if we do.
(globals_of_w32fns): Initialize dwMainThreadId in non-interactive
mode.
* src/sysdep.c [HAVE_STACK_OVERFLOW_HANDLING]: Add !WINDOWSNT to
the condition, as HAVE_STACK_OVERFLOW_HANDLING is now defined for
the MinGW build, but the code guarded by that is for Posix hosts.
* src/keyboard.c (command_loop) [WINDOWSNT]: Call
w32_reset_stack_overflow_guard.

* nt/inc/ms-w32.h (sigjmp_buf): New typedef.
(sigsetjmp): New macro.
(w32_reset_stack_overflow_guard): Declare the prototype.

* configure.ac (HAVE_STACK_OVERFLOW_HANDLING): Set to 1 for MinGW.
configure.ac
nt/inc/ms-w32.h
src/keyboard.c
src/sysdep.c
src/w32fns.c