emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Avoid C stack overflow


From: Dmitry Antipov
Subject: Avoid C stack overflow
Date: Thu, 13 Mar 2014 20:42:52 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

In http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16999 the user, guided by 
interactive
help and documentation, got a crash caused by C stack overflow. What about an 
attempt
to avoid such a mess by examining current C stack depth and check it against 
system
limits, like suggested in the patch below?

For those who cares about MS-Windows, this looks like a rough equivalent to
getrlimit (RLIMIT_STACK,...):

http://stackoverflow.com/questions/21754928/how-to-get-stack-size-and-stack-limit-of-any-thread-using-win32-api

Dmitry

Attachment: error_if_c_stack_overflow.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]