diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2011-04-13 11:03:30 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2011-04-13 11:03:30 (GMT) |
commit | 4884764d1d8d9cf7bd61e25622b0173c43e46114 (patch) | |
tree | afcc09a79fc200634cc3c3b8c7651d33219cf206 | |
parent | ac9480ca488c245a75ac57acd5ca9253de732edd (diff) | |
download | tcl-4884764d1d8d9cf7bd61e25622b0173c43e46114.zip tcl-4884764d1d8d9cf7bd61e25622b0173c43e46114.tar.gz tcl-4884764d1d8d9cf7bd61e25622b0173c43e46114.tar.bz2 |
[3285375]: Make the crash less mysterious through the judicious use of a panic.
-rw-r--r-- | ChangeLog | 27 | ||||
-rw-r--r-- | generic/tclUtil.c | 5 |
2 files changed, 22 insertions, 10 deletions
@@ -1,3 +1,9 @@ +2011-04-13 Donal K. Fellows <dkf@users.sf.net> + + * generic/tclUtil.c (Tcl_ConcatObj): [Bug 3285375]: Make the crash + less mysterious through the judicious use of a panic. Not yet properly + fixed, but at least now clearer what the failure mode is. + 2011-04-12 Don Porter <dgp@users.sourceforge.net> * tests/string.test: Test for [Bug 3285472]. Not buggy in trunk. @@ -8,31 +14,32 @@ 2011-04-12 Miguel Sofer <msofer@users.sf.net> - * generic/tclBasic.c: fix for [Bug 2440625], kbk's patch + * generic/tclBasic.c: Fix for [Bug 2440625], kbk's patch 2011-04-11 Miguel Sofer <msofer@users.sf.net> * generic/tclBasic.c: - * tests/coroutine.test: insure that 'coroutine eval' runs the initial - command in the proper context, [Bug 3282869] - + * tests/coroutine.test: [Bug 3282869]: Ensure that 'coroutine eval' + runs the initial command in the proper context. + 2011-04-11 Jan Nijtmans <nijtmans@users.sf.net> - * generic/tcl.h: fix for [Bug 3281728]: Tcl sources from 2011-04-06 do - * unix/tcl.m4: not build on GCC9 (RH9) + + * generic/tcl.h: Fix for [Bug 3281728]: Tcl sources from 2011-04-06 + * unix/tcl.m4: do not build on GCC9 (RH9) * unix/configure: 2011-04-08 Jan Nijtmans <nijtmans@users.sf.net> - * win/tclWinPort.h: fix for [Bug 3280043]: win2k: unresolved DLL imports - * win/configure.in + * win/tclWinPort.h: Fix for [Bug 3280043]: win2k: unresolved DLL + * win/configure.in: imports. * win/configure 2011-04-06 Miguel Sofer <msofer@users.sf.net> - * generic/tclExecute.c (TclCompileObj): earlier return if Tip280 + * generic/tclExecute.c (TclCompileObj): Earlier return if Tip280 gymnastics not needed. - * generic/tclExecute.c: fix for [Bug 3274728], making *catchTop an + * generic/tclExecute.c: Fix for [Bug 3274728]: making *catchTop an unsigned long. 2011-04-06 Jan Nijtmans <nijtmans@users.sf.net> diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 64aa824..46ddf85 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -1110,10 +1110,15 @@ Tcl_ConcatObj( allocSize = 0; for (i = 0; i < objc; i++) { + int oldAllocSize = allocSize; + objPtr = objv[i]; element = TclGetStringFromObj(objPtr, &length); if ((element != NULL) && (length > 0)) { allocSize += (length + 1); + if (allocSize < oldAllocSize) { + Tcl_Panic("too much memory required"); + } } } if (allocSize == 0) { |