[Pkg-tcltk-devel] Bug#452679: Bug#452679: Bug#452679: tcl8.5: FTBFS: out of stack space (infinite loop?)

Sergei Golovan sgolovan at nes.ru
Mon Nov 26 09:40:38 UTC 2007


On 11/25/07, Joe English <jenglish at flightlab.com> wrote:
>
> Upstream bug report:
>
> http://sourceforge.net/support/tracker.php?aid=1815573
>
> In the meantime, compiling with -DNO_TCL_CHECK_STACK_SPACE
> should avoid the problem.

Unfortunately, disabling stack checking only hides the problem (it
then causes random segfaults when stack is overflowed)

We did some research over this bug with Miguel Sofer (who is
responsible for it in upstream development) and found that the problem
is in the following lines (in tclUnixThrd.c):

    if (TclpPthreadGetAttrs(pthread_self(), &threadAttr) != 0) {
        pthread_attr_destroy(&threadAttr);
        return -1;
    }

where TclpPthreadGetAttrs is defined as pthread_getattr_np.
pthread_getattr_np gives incorrect stack size for initial thread which
is used further and causes corruption.

So, I wouldn't like to upload a new version without stack checking.
I'd wait until Miguel fixes the bug in upstream.

Cheers!
-- 
Sergei Golovan





More information about the Pkg-tcltk-devel mailing list