Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#595 stack overflows are not caught in non-initial threads

segfault
open
5
2011-04-05
2011-04-05
Don Cohen
No

Test case:
[1]> (defun f()(f))
F
[2]> (f)

*** - Lisp stack overflow. RESET

whereas
Break 1 [4]> (mt:make-thread (lambda nil (f)))
#<THREAD :LAMBDA>
Break 1 [4]> Segmentation fault (core dumped)

Re: stack overflow => segfault in MT
From: Vladimir Tzankov <vtzankov@gm...> - 2011-03-06 22:28

On 3/6/11, Don Cohen <don-sourceforge-xxz@...> wrote:
> I send this on the theory that any segfault qualifies as a clisp bug.
> This is with current source. On non-MT I get
> *** - Program stack overflow. RESET
> whereas in MT I get segfault.

With MT - only the "main thread" (first one) has stack overflow detection.
Stack overflow detection/recovery is implemented via libsigsegv and it
supports single stack range.
May be libsigesgv should be enhanced with multiple stack range support? gSam?

Discussion