summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2011-03-07 22:23:11 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2011-03-07 22:23:11 (GMT)
commit7b1f9159604d4005f984eb3f32a4be126e5a4834 (patch)
tree9530bd9ba3ed58012f99ee81e59968a409052318 /unix
parent259e45cecd536335e791f739db9e4c1c462c2eea (diff)
downloadtcl-7b1f9159604d4005f984eb3f32a4be126e5a4834.zip
tcl-7b1f9159604d4005f984eb3f32a4be126e5a4834.tar.gz
tcl-7b1f9159604d4005f984eb3f32a4be126e5a4834.tar.bz2
Fix [Bug 3166410]: "out of stack space" on AIX
Diffstat (limited to 'unix')
-rw-r--r--unix/tclUnixInit.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index a798ccb..5111746 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -1092,9 +1092,19 @@ TclpGetCStackParams(
if (stackGrowsDown) {
tsdPtr->stackBound = (int *) ((char *)tsdPtr->outerVarPtr -
stackSize);
+ if (tsdPtr->stackBound > tsdPtr->outerVarPtr) {
+ /* Overflow, that should never happen, just set it to NULL.
+ * See [Bug #3166410] */
+ tsdPtr->stackBound = NULL;
+ }
} else {
tsdPtr->stackBound = (int *) ((char *)tsdPtr->outerVarPtr +
stackSize);
+ if (tsdPtr->stackBound < tsdPtr->outerVarPtr) {
+ /* Overflow, that should never happen, just set it to NULL.
+ * See [Bug #3166410] */
+ tsdPtr->stackBound = NULL;
+ }
}
}