Overview
| Artifact ID: | 5d801afee08985461c4b2009df732eb5a535d28b |
|---|---|
| Ticket: | 3166410fffffffffffffffffffffffffffffffff
"out of stack space" on AIX |
| User & Date: | starwalker2000 on 2011-01-27 07:39:43 |
Changes
- assignee changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
I've got "out of stack space" error on AIX when running 32bits-tclsh. No such error of 64bits-tclsh. I've traced the code of tcl, I found following problem: [1] stopped in TclpGetCStackParams at line 1095 in file "/tellin/hjw/tcl8.5.9/unix/../unix/tclUnixInit.c" ($t1) 1095 tsdPtr->stackBound = (int *) ((char *)tsdPtr->outerVarPtr - (dbx) n stopped in TclpGetCStackParams at line 1097 in file "/tellin/hjw/tcl8.5.9/unix/../unix/tclUnixInit.c" ($t1) 1097 } else { (dbx) p tsdPtr->outerVarPtr 0x2ff22460 (dbx) p stackSize 2147450878 (dbx) print tsdPtr->stackBound 0xaff2a462 According to the message above, the stackSize is a very great value, almost 2G, and tsdPtr->stackBound is a overflowed number. This cause following code returns false: #define CheckCStack(iPtr, localIntPtr) \ ((localIntPtr) > (iPtr)->stackBound) (dbx) p &localInt 0x2ff221a0 (dbx) p iPtr->stackBound 0xaff2a462 For 64bits-tclsh, the situation is as follows: [1] stopped in TclpGetCStackParams at line 1095 in file "/tellin/hjw/tcl8.5.9-64/unix/../unix/tclUnixInit.c" ($t1) 1095 tsdPtr->stackBound = (int *) ((char *)tsdPtr->outerVarPtr - (dbx) n stopped in TclpGetCStackParams at line 1097 in file "/tellin/hjw/tcl8.5.9-64/unix/../unix/tclUnixInit.c" ($t1) 1097 } else { (dbx) print tsdPtr->outerVarPtr 0x0ffffffffffff140 (dbx) print stackSize 4294934528 (dbx) print tsdPtr->stackBound 0x0fffffff00007140 The stackSize is amost 4G, but tsdPtr->stackBound is not overflowed. So the CheckCStack returns true. - foundin changed to: "obsolete: 8.5.9"
- is_private changed to: "0"
- priority changed to: "5 Medium"
- resolution changed to: "None"
- status changed to: "Open"
- submitter changed to: "starwalker2000"
- subsystem changed to: "None"
- title changed to: ""out of stack space" on AIX"
- type changed to: "Bug"