summaryrefslogtreecommitdiffstats
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)
commit510b9e1bd84eeaee50e9153f4730d552eb8af83c (patch)
tree9530bd9ba3ed58012f99ee81e59968a409052318
parent95663715b2beead67589bffa8d5d2ec13221c0c2 (diff)
downloadtcl-510b9e1bd84eeaee50e9153f4730d552eb8af83c.zip
tcl-510b9e1bd84eeaee50e9153f4730d552eb8af83c.tar.gz
tcl-510b9e1bd84eeaee50e9153f4730d552eb8af83c.tar.bz2
Fix [Bug 3166410]: "out of stack space" on AIX
-rw-r--r--ChangeLog4
-rw-r--r--unix/tclUnixInit.c10
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e33ff69..7f54c6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-03-07 Jan Nijtmans <nijtmans@users.sf.net>
+
+ * unix/tclUnixInit:
+
2011-03-06 Don Porter <dgp@users.sourceforge.net>
* generic/tclBasic.c: More replacements of Tcl_UtfBackslash() calls
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;
+ }
}
}