Skip to content
Tcl Source Code History Of Ticket 450795ffffffffffffffffffffffffffffffffff
Login

History Of Ticket 450795ffffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 450795ffffffffffffffffffffffffffffffffff

  1. Ticket change [4c62c78ec2] (rid 126886) by msofer on 2001-08-14 14:01:42:

    1. assignee initialized to: "dgp"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      TclpCheckStackSpace() (in unix/tclUnixInit.c) should be
      implemented for unix - it is already implemented for
      both Mac and Win.
      
      It's role is to prevent C-stack overflow, producing an
      error instead of who knows what.
      
    4. foundin initialized to: "None"
    5. priority initialized to: "5 Medium"
    6. resolution initialized to: "None"
    7. status initialized to: "Open"
    8. submitter initialized to: "msofer"
    9. subsystem initialized to: ""
    10. title initialized to: "implement TclpCheckStackSpace() for unix"
    11. type initialized to: "Patch"
  2. Add attachment "stackSpace.patch.gz" [1e2b3301f1] (rid 90933) by msofer on 2002-02-26 00:37:30.

  3. Ticket change [7e42e45f89] (rid 97381) by msofer on 2002-02-26 00:37:30:

    1. assignee changed to: "msofer"
    2. icomment:
      
      
      File Added - 18399: stackSpace.patch.gz
      
      Logged In: YES 
      user_id=148712
      
      I attach a patch (gzipped) that implements
      TclpCheckStackSpace.
      
      Please test it on different unixen - it runs ok with gcc
      (egcs-2.91.66, glibc 2.1.3) on linux/intel.
      
      Some comments:
      
      1. in order to use, the new function TclpInitCheckStackSpace
      (tclUnixInit.c) should be called with a stack address as
      early as possible. In the patch, this is done from Tcl_Main
      so that the writers of special shells do not have to worry
      about it.
      
      2. as it is here, the functionality is not available for
      embedders - the new function is not declared in the stubs
      tables. If the functionality is deemed necessary, it may be
      worth considering making it public (or called from some new
      Tcl_InitializeSystem). That would require TIPping.
      
      3. if TclpInitCheckStackSpace is never called, the behaviour
      is the same as without the patch: it is always assumed that
      there is enough stack space to continue.
      
      Comments welcome!
      
      
    3. login: "msofer"
    4. mimetype: "text/plain"
    5. username: "msofer"
  4. Ticket change [e4d7f3817f] (rid 88029) by msofer on 2002-02-26 00:38:31:

    1. assignee changed to: "nobody"
    2. subsystem changed to: "None"
  5. Ticket change [d2e196538e] (rid 113604) by msofer on 2002-02-26 00:42:11:

    1. assignee changed to: "msofer"
  6. Ticket change [6b75a326ba] (rid 128335) by dkf on 2002-02-26 20:57:33:

    1. icomment:
      Logged In: YES 
      user_id=79902
      
      Looks mostly good to me, both with GCC and with SunPro CC on
      Solaris/SPARC, except for the configure script which ought
      to print out more of what it is doing with your stackspace
      check as well as cacheing the values concerned.  Luckily,
      this is easy to add - see the extra patch which I supply
      which should be applied *after* yours.
      
      The other minor quibble I've noticed (from using SunPro CC)
      is that you shouldn't do
         #undef TclpCheckStackSpace()
      but rather just
         #undef TclpCheckStackSpace
      
      (SunPro CC is great, because it moans about completely
      different things to GCC. :^)
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  7. Add attachment "configure.patch" [792844340f] (rid 90083) by dkf on 2002-02-26 20:57:34.

  8. Ticket change [abacd0a2c7] (rid 101157) by dkf on 2002-02-26 20:57:39:

    1. icomment:
      
      
      File Added - 18461: configure.patch
      
      
      
    2. login: "dkf"
    3. mimetype: "text/plain"
    4. username: "dkf"
  9. Ticket change [6b002961a0] (rid 128244) by msofer on 2002-02-26 22:22:46:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Improved stackSpace2.patch:
        * corrections as suggested by Donal
        * more checks and default behaviour in tclUnixInit.c
      
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  10. Ticket change [44fc7cdc0b] (rid 116803) by msofer on 2002-02-26 22:22:47:

    1. icomment:
      
      
      File Added - 18464: stackSpace2.patch.gz
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  11. Ticket change [79b7c523cb] (rid 90179) by msofer on 2002-02-26 22:52:19:

    1. icomment:
      
      
      File Deleted - 18464: 
      
      Logged In: YES 
      user_id=148712
      
      Aargh! Removing patch2 2 (typos); back in a few minutes!
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  12. Ticket change [1d5252b3b3] (rid 90784) by msofer on 2002-02-26 22:56:54:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      OKnow ...
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  13. Add attachment "stackSpace2.patch.gz" [768563674c] (rid 105604) by msofer on 2002-02-26 22:56:54.

  14. Ticket change [8a22192604] (rid 127343) by msofer on 2002-02-26 22:56:55:

    1. icomment:
      
      
      File Added - 18465: stackSpace2.patch.gz
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  15. Ticket change [3650ab36bc] (rid 107088) by msofer on 2002-02-27 21:50:45:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      Note that this patch implements a "light"
      TclpCheckStackSpace: it monitors the remaining stack space
      with respect to the maximum allowed by the OS, but *not*
      against stack-heap collisions. The win implementation (and
      presumably the mac too) monitor both.
      
      Joe English has proposed a solution for linux/gcc in
      non-threaded builds that monitors the stack-heap distance
      "as long as you haven't called mmap()/shmget/whatever (not
      sure how that affects the memory map)". It is done by
      setting the condition to monitor to
      
      ((&here > tclMinCStackPos) && (&here  > sbrk(0) +
      tclMinCStackSize))
      
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  16. Ticket change [bdb62b7216] (rid 101949) by msofer on 2002-02-28 00:33:35:

    1. icomment:
      
      
      File Added - 18530: stackSpace3.patch.gz
      
      Logged In: YES 
      user_id=148712
      
      New "production-ready" stackSpace3.patch, for review.
      
      It is still missing the adaptation to threaded builds; as
      before, it does not guard against stack-heap collisions.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  17. Add attachment "stackSpace3.patch.gz" [ba4c3aedba] (rid 129298) by msofer on 2002-02-28 00:33:35.

  18. Ticket change [664f4c79c1] (rid 102688) by hobbs on 2003-11-12 07:11:16:

    1. closedate changed to: "2003-11-12T00:11:16"
    2. closer changed to: "hobbs"
    3. icomment:
      Logged In: YES 
      user_id=72656
      
      dup of 746378 - we should compare the differences between 
      these two approaches.
      
      
    4. login: "hobbs"
    5. mimetype: "text/plain"
    6. resolution changed to: "Duplicate"
    7. status changed to: "Closed"
    8. username: "hobbs"
  19. Ticket change [5d84ca04bf] (rid 115475) by msofer on 2003-11-12 08:27:55:

    1. icomment:
      Logged In: YES 
      user_id=148712
      
      IIUC, 746378 started on this approach and improved it a lot
      - in particular, making it work also for threaded builds. 
      If that is correct, this patch is superceded by 746378.
      
      
    2. login: "msofer"
    3. mimetype: "text/plain"
    4. username: "msofer"
  20. Ticket change [099f029f55] (rid 113689) by dkf on 2003-11-12 22:58:03:

    1. subsystem changed to: "38. Init - Library - Autoload"