Skip to content
Tcl Source Code History Of Ticket 3205320
Login

History Of Ticket 3205320

Artifacts Associated With Ticket 3205320

  1. Ticket change [0f7c73d325] (rid 94798) by msofer on 2011-03-10 11:06:46:

    1. assignee initialized to: "stwo"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      -------- Original Message --------
      Subject: [Pkg-tcltk-devel] Bug#617628: tcl8.5: Tcl/Tk applications on powerpc crash on startup with out of stack space message
      Date: Wed, 9 Mar 2011 21:47:51 -0500
      From: Paul Mackerras <[email protected]>
      Reply-To: Paul Mackerras <[email protected]>, "[email protected]" <[email protected]>
      To: [email protected] <[email protected]>
      
      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
      
      
    4. foundin initialized to: "obsolete: 8.5.9"
    5. is_private initialized to: "0"
    6. priority initialized to: "8"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "msofer"
    10. subsystem initialized to: "53. Configuration and Build Tools"
    11. title initialized to: "stack space detection defeated by inlining"
    12. type initialized to: "Bug"
  2. Ticket change [f1c11e0f24] (rid 109410) by msofer on 2011-03-10 18:09:01:

    1. icomment:
      This happens in unix/configure.in at or near line 704.
      
      Can that thing be try-compiled without any optimizations to avoid inlining?
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  3. Ticket change [c524a80bfd] (rid 111946) by nijtmans on 2011-03-10 18:28:12:

    1. icomment:
      Or, replace the little program by the piece below.
      
      No matter what compiler optimizations, this
      funcion can never be inlined, because it
      calls itself ;-)
      =================================
      int StackGrowsUp(int *parent) {
          int here;
          if (parent)
              return (&here < parent);
          else
              return StackGrowsUp(&here);
      }
      int main (int argc, char *argv[]) {
          return StackGrowsUp(0);
      }
      
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  4. Ticket change [3034bf7f07] (rid 93208) by msofer on 2011-03-10 22:04:19:

    1. assignee changed to: "nijtmans"
    2. icomment:
      jan, could you take care of it?
      
      
    3. login: "msofer"
    4. mimetype: "text/plain"
    5. username: "msofer"
  5. Ticket change [ffa5d3b057] (rid 108785) by nijtmans on 2011-03-10 22:12:09:

    1. icomment:
      At first sight, this looked related to:
      <https://sourceforge.net/tracker/?func=detail&atid=110894&aid=3166410&group_id=10894>
      but taking a further look, it's a totally different thing. However,
      the mentioned trick should work. I'll take care of it.
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  6. Ticket change [a7ca3a607b] (rid 98867) by nijtmans on 2011-03-11 04:43:00:

    1. closedate changed to: "2011-03-10T21:43:00"
    2. closer changed to: "nijtmans"
    3. icomment:
      
      
      allow_comments - 1
      
      Fixed in core-8-5-branch. Not applicable to trunk (just merge-marked there)
      
      
    4. login: "nijtmans"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "nijtmans"
  7. Ticket change [002f64674a] (rid 119267) by nijtmans on 2011-03-11 04:43:28:

    1. icomment:
      
      
      allow_comments - 0
      
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"
  8. Ticket change [37cdcffd5d] (rid 112095) by nijtmans on 2013-04-03 20:27:40:

    1. icomment:
      See: <http://code.activestate.com/lists/tcl-core/13192/>
      
      It turns out that this bug was never fixed in the CROSS_COMPILE case. Now it is.
      
      
    2. login: "nijtmans"
    3. mimetype: "text/plain"
    4. username: "nijtmans"