[Ecls-list] status of stack overflow detection on Windows
Juan Jose Garcia-Ripoll
juanjose.garciaripoll at googlemail.com
Tue Jan 27 15:10:28 UTC 2009
On Sat, Jan 24, 2009 at 7:21 PM, Robert Dodier <robert.dodier at gmail.com> wrote:
> There seems to be some code to detect stack overflows on Linux.
> Thanks for implementing that, it's helpful.
> Is there stack overflow detection on Windows?
> What about Unix-like platforms other than Linux?
The code based on hardware detection of stack overflows, which is
based on the detection of certain signals (SIGSEGV in particular)
should work also on the *BSD ports, but I do not think it works on
Windows.
Maybe the Windows exception handler (src/c/unixint.d) can be extended
to trap those conditions, but I do not know enough about that
platform.
If this is not possible, the code I inserted for checking stack
overflows explicitely should still work. These are calls to
ecl_cs_check() inserted by the lisp->C compiler, which verify that the
stack limits have not been reached. These calls are inserted when code
is compiled with (OPTIMIZE (SPEED 2)) or higher.
Juanjo
--
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28009 (Spain)
http://juanjose.garciaripoll.googlepages.com
More information about the ecl-devel
mailing list