[Ecls-list] Latest changes

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Thu Oct 2 10:47:29 UTC 2008


All code mentioned below has been uploaded to the GIT and CVS repositories.

 - The signal handler now detects whether certain signals (SIGBUS, SIGILL)
   are missing on a platform.

 - The previous stack limits were too small and that caused some platforms
   to abort during the ECL build. This has been fixed.

 - ECL now includes checks for stack overflows in certain functions
   which are frequently used. This should make it possible to detect
   machine stack overflows even in compiled code on platforms where
   we cannot use the signal handlers to reliably detect this.

 - ECL now implements a more transparent interface for setting and querying
   options related to signal trapping, stack sizes and general behavior. These
   are options that should be set before calling cl_boot() to customize later
   behavior. It does not make sense to change them at run time. The current
   list of options is set with ecl_set_option(code, value) and queried with
   ecl_get_option(code):
	ECL_OPT_INCREMENTAL_GC,
	ECL_OPT_TRAP_SIGSEGV,
	ECL_OPT_TRAP_SIGFPE,
	ECL_OPT_TRAP_SIGINT,
	ECL_OPT_TRAP_SIGILL,
	ECL_OPT_TRAP_SIGBUS,
	ECL_OPT_BOOTED, /* read only */
	ECL_OPT_BIND_STACK_SIZE,
	ECL_OPT_BIND_STACK_SAFETY_AREA,
	ECL_OPT_FRAME_STACK_SIZE,
	ECL_OPT_FRAME_STACK_SAFETY_AREA,
	ECL_OPT_LISP_STACK_SIZE,
	ECL_OPT_LISP_STACK_SAFETY_AREA,
	ECL_OPT_C_STACK_SIZE,
	ECL_OPT_C_STACK_SAFETY_AREA,
	ECL_OPT_SIGALTSTACK_SIZE,
	ECL_OPT_LIMIT

As an example of current features, I have built ECL on a platform that
provides its own version of the garbage collector. This version does
not work well with our code for SIGSEGV detection and hence the most
efficient implementation does not work. But the stack overflow is
still detected. Note that this detection mechanism does allow for
recovery, while the detection based on a SIGSEGV handler does not
guarantee graceful recovery because of C's constraints.

ECL (Embeddable Common-Lisp) 8.10.0 (CVS 2008-07-12 18:54)
Copyright (C) 1984 Taiichi Yuasa and Masami Hagiya
Copyright (C) 1993 Giuseppe Attardi
Copyright (C) 2000 Juan J. Garcia-Ripoll
ECL is free software, and you are welcome to redistribute it
under certain conditions; see file 'Copyright' for details.
Type :h for Help.  Top level.
> (defun foo (x) (foo (1+ x))) (foo 1)
FOO
> C-STACK overflow at size 532672. Stack can probably be resized.
Broken at SI:BYTECODES.Available restarts:
1. (CONTINUE) Extend stack size
Broken at FOO.
>> :r1
C-STACK overflow at size 807392. Stack can probably be resized.
Broken at SI:BYTECODES.Available restarts:
1. (CONTINUE) Extend stack size
Broken at FOO.
>> :q
Top level.

-- 
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