[Pkg-tcltk-devel] Bug#617628: tcl8.5: Tcl/Tk applications on powerpc crash on startup with out of stack space message

Paul Mackerras paulus at samba.org
Thu Mar 10 02:47:51 UTC 2011


Subject: tcl8.5: Tcl/Tk applications on powerpc crash on startup with out of stack space message
Package: tcl8.5
Version: 8.5.9-2
Justification: renders package unusable
Severity: grave
Tags: upstream

*** Please type your report below this line ***

The tcl libraries now end up being built with -DTCL_STACK_GROWS_UP=1
on the cc command line, which causes the check for stack overflow to
have the wrong polarity.  Consequently, every Tcl and Tcl/Tk application
exits immediately on startup with a message about being out of stack
space.

The configure test that causes this flag to be set works by running
a small program that looks like this:

        int StackGrowsUp(int *parent) {
            int here;
            return (&here < parent);
        }
        int main (int argc, char *argv[]) {
            int foo;
            return StackGrowsUp(&foo);
        }

What happens is that gcc now inlines the StackGrowsUp function, meaning
that the result of the program depends only on how gcc's algorithm for
assigning stack slots for local variables happens to lay out the stack.
On powerpc with gcc-4.5.2 (Debian version 4:4.5.2-1), gcc allocates
`here' above `foo', which makes it look like the stack grows up when
in fact it grows down.

This could happen on any architecture where gcc automatically inlines
functions.  It so happens that it doesn't on x86 at the moment and does
on powerpc.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (990, 'unstable')
Architecture: powerpc (ppc64)

Kernel: Linux 2.6.36-rc4+ (SMP w/4 CPU cores)
Locale: LANG=en_AU.UTF-8, LC_CTYPE=en_AU.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages tcl8.5 depends on:
ii  libc6                         2.11.2-11  Embedded GNU C Library: Shared lib

tcl8.5 recommends no packages.

Versions of packages tcl8.5 suggests:
ii  tclreadline                   2.1.0-10   GNU Readline Extension for Tcl/Tk

-- no debconf information





More information about the Pkg-tcltk-devel mailing list