Artifacts Associated With Ticket 1066755fffffffffffffffffffffffffffffffff
Ticket change [c33555aeb2] (rid 111621) by stevebold on 2004-11-15 16:20:57:
- assignee initialized to: "mdejong"
- cmimetype initialized to: "text/plain"
- comment initialized to:
TIP 87 indicates that the default recursion depth for Tcl is 1000 and that this can be changed by scripts. However, on Windows XP this does not seem to be the case. Consider this script: set level 0 proc a {} { set ::level [info level] a } a With the Active Tcl build of 8.5a1, it fails with $level set to 375. ActiveTcl 8.4.6 failed with $level set to 395. My own build of 8.4.3 failed with $level set to 902. Setting calling 'interp recursionlimit {} 2000' makes no difference to these numbers. On Solaris, this problem is not seen. - foundin initialized to: "obsolete: 8.5a1"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "stevebold"
- subsystem initialized to: "52. Portability Support"
- title initialized to: "Surprisingly low recursion limit on Windows"
- type initialized to: "Bug"
Ticket change [f7d66044c0] (rid 91439) by davygrvy on 2004-11-25 03:03:14:
- icomment:
Logged In: YES user_id=7549 are we out of stack space or is it the soft limit?
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [d85db5dc17] (rid 107421) by davygrvy on 2004-11-25 06:23:42:
- icomment:
Logged In: YES user_id=7549 This must be an actual stack space issue for you as I can go to 999 for both 8.4 and 8.5 shells. But I'm running on Win2K.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [fe1cb1ff80] (rid 108524) by stevebold on 2004-11-25 16:56:56:
- icomment:
Logged In: YES user_id=810219 Tried ActiveTcl 8.4.6 on a Windows 2000 box and still saw a limit of 395. Used 'dumpbin -headers tclsh84.exe' to look at the stack size. On by own build of 8.4.3 I see: 231860 size of stack reserve 1000 size of stack commit On ActiveTcl 8.4.6 I see: 100000 size of stack reserve 1000 size of stack commit With ActiveTcl8.5 I see: 100000 size of stack reserve 1000 size of stack commit win/makefile.vc seems to be constant in specifying 2.3MB of stack space for 8.4 and 8.5. Dumpbin doesn't document the unit of stack size, it appears to be in units of 10 bytes. So it looks like: a. ActiveTcl is built with the stack stack size set to the Windows default of 1MB, not that in makefile.vc b. even 2.3MB is a little too small to achieve a stack depth of 1000 - login: "stevebold"
- mimetype: "text/plain"
- username: "stevebold"
- icomment:
Ticket change [de1f04abea] (rid 114789) by davygrvy on 2004-11-25 21:14:28:
- assignee changed to: "hobbs"
- icomment:
Logged In: YES user_id=7549 editbin /stack:2300000,4096 tclsh85.exe That's how to change it after the fact. The TEA makefile should have this modified to add the '-stack:2300000' switch to the linker commandline.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
Ticket change [28a422268f] (rid 88736) by davygrvy on 2004-11-26 06:22:41:
- icomment:
Logged In: YES user_id=7549 units for dumpbin are in hex 2300000 == 0x231860 I think that it's odd that you can only go to 902, as I can hit 1795 before the stack runs out. I wonder if this is an XP thing?
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [1dcfe38ceb] (rid 90877) by stevebold on 2004-11-26 17:18:36:
- icomment:
Logged In: YES user_id=810219 Ok, I tried again today (on XP) and with my 8.4.3 build and, with 'interp recursionlimit {} 2000' I'm now able to get up to 1987. I suppose something must have changed in the last couple of weeks but I'm not sure what, we haven't changed or rebuilt the interpreter. I did notice that running the script twice in the same tclsh session gives a slightly higher limit the second time around (1992 instead of 1987). I wonder if their are other factors affecting the permitted size of the stack? I'll try again in a few days and see if the numbers have shifted again. - login: "stevebold"
- mimetype: "text/plain"
- username: "stevebold"
- icomment:
Ticket change [ada54d2b70] (rid 101506) by stevebold on 2004-11-26 23:37:39:
- icomment:
Logged In: YES user_id=810219 Also found that, at least in 8.4.3, building using makefile.vc, wish is built with a 1MB stack and only tclsh gets the 2.3MB stack. Has this been rationalised in 8.5, if not should it be?
- login: "stevebold"
- mimetype: "text/plain"
- username: "stevebold"
- icomment:
Ticket change [5b8dba3b31] (rid 118345) by davygrvy on 2004-11-27 03:51:24:
- icomment:
Logged In: YES user_id=7549 yup, wish needs more stack. I just tested 8.5, and I couldn't get past 775. Added -stack:2300000 to the link and brought it up to 1795. I'll push this out for Tk, but the TEA makefiles need this added, too.
- login: "davygrvy"
- mimetype: "text/plain"
- username: "davygrvy"
- icomment:
Ticket change [c2d7ff2e34] (rid 111552) by hobbs on 2005-10-05 13:36:47:
- icomment:
Logged In: YES user_id=72656 Why does TEA need this? It seems that this should just be needed by the Tcl core makefiles and nowhere else.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
- icomment:
Ticket change [5616930ecd] (rid 94261) by hobbs on 2007-06-13 02:43:17:
- assignee changed to: "dgp"
- foundin changed to: "obsolete: 8.5a7"
- icomment:
Logged In: YES user_id=72656 Originator: NO Improvements have been made to stack handling that has 8.5a7 seeing 834 levels possible. Don believes that more aggressive use of TclStackAlloc in the core will get us to the "default" 1000 without needing -stack.
- login: "hobbs"
- mimetype: "text/plain"
- resolution changed to: "Out of Date"
- username: "hobbs"
Ticket change [6a586b4d29] (rid 128134) by dgp on 2007-06-14 03:39:18:
- assignee changed to: "msofer"
- icomment:
Logged In: YES user_id=80530 Originator: NO There are more places to use TclStackAlloc and the newer TclStackRealloc, but it doesn't appear those places will impact the particular demo script here, which is focused specifically on a recursive proc. The call stack to examine for stack reduction in the HEAD is: TclExecuteByteCode (doInvocation) TclEvalObjvKnownCommand TclObjInterpProc ObjInterpProcEx TclObjInterpProcCore TclCompEvalObj TclExecuteByteCode
- login: "dgp"
- mimetype: "text/plain"
- subsystem changed to: "22. [proc] and [uplevel]"
- username: "dgp"
Ticket change [6337f73e0d] (rid 92540) by dgp on 2007-06-14 03:44:26:
- icomment:
Logged In: YES user_id=80530 Originator: NO A simple thing to try would be to inline TclObjInterpProcCore within what appears to be its only caller, ObjInterpProcEx (which raises the questions why it is not a file static routine, and why it's in the internal stubs table?)
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [f7821f1bf6] (rid 91389) by msofer on 2007-06-14 05:50:07:
- icomment:
Logged In: YES user_id=148712 Originator: NO As a service to OO extensions: tclOO calls into TclObjInterpProcCore, xotcl and itcl both call into TclObjInterpProc. I guess it could be feasible to modify things so that the core does not call TclObjInterpProc, thus removing one item from the stack. At least gcc optimises that tail call away: TclObjInterpProc does not appear in a stack trace in a standard -O2 (no -g) build. Otherwise, maybe this is the signal that the time has come to bite the bullet and bring NRE up to date and into HEAD?
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
- icomment:
Ticket change [8146c64549] (rid 117001) by msofer on 2007-06-14 09:46:10:
- assignee changed to: "hobbs"
- icomment:
Logged In: YES user_id=148712 Originator: NO Please test on HEAD - the call to TclCompEvalObj is now gone from that stack trace.
- login: "msofer"
- mimetype: "text/plain"
- username: "msofer"
Ticket change [28d4fe614b] (rid 88770) by dkf on 2007-06-14 16:27:30:
- icomment:
Logged In: YES user_id=79902 Originator: NO TclObjInterpProcCore is an entry point I added so that TclOO's methods don't need to reach too deeply into the core's guts. The alternative to having it is that a *lot* more details get leaked to anyone who needs to build non-standard procedure-like things.
- login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [345dbb6342] (rid 106751) by hobbs on 2007-06-15 00:13:21:
- assignee changed to: "msofer"
- icomment:
Logged In: YES user_id=72656 Originator: NO Improved to 857. Miguel is looking at the NRE again and other methods to reduce call overheads.
- login: "hobbs"
- mimetype: "text/plain"
- priority changed to: "4"
- resolution changed to: "None"
- username: "hobbs"
Ticket change [a02e96503f] (rid 96757) by dkf on 2007-06-16 21:01:46:
- icomment:
Logged In: YES user_id=79902 Originator: NO With the HEAD building with msys (optimized, but untweaked) on WinXPSP2, I'm now getting a recursion depth of 1755. Test script was: interp recursionlimit {} 2000 proc foo {} {global i;incr i;foo} catch {foo bar} set i 0 catch { foo } puts $i puts [time { catch { foo } } 1000] exit If others can confirm this, I'd call this issue closed. - login: "dkf"
- mimetype: "text/plain"
- username: "dkf"
- icomment:
Ticket change [53abaf2846] (rid 93797) by dgp on 2007-06-18 23:23:39:
- icomment:
Logged In: YES user_id=80530 Originator: NO perhaps an addition to the test suite to alert us if/when the limit gets small again?
- login: "dgp"
- mimetype: "text/plain"
- username: "dgp"
- icomment:
Ticket change [d34c6967f6] (rid 123269) by msofer on 2008-06-28 21:23:28:
- closedate changed to: "2008-06-28T14:23:28"
- closer changed to: "msofer"
- status changed to: "Pending"
Ticket change [d2b9254235] (rid 113579) by sf-robot on 2008-07-13 09:20:23:
- closedate changed to: "2008-07-13T02:20:23"
- closer changed to: "sf-robot"
- icomment:
Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 14 days (the time period specified by the administrator of this Tracker).
- login: "sf-robot"
- mimetype: "text/plain"
- status changed to: "Closed"
- username: "sf-robot"