diff options
author | dgp <dgp@users.sourceforge.net> | 2016-05-06 16:03:15 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-05-06 16:03:15 (GMT) |
commit | 024bab411658378d39fd0d8a6ce363b72cdebacd (patch) | |
tree | 697e3bc003c0d5b5ba5962d5bf63c90957d5f036 /generic | |
parent | 8e5a574ac054782c904f88a1fe3af0eb54a42f1e (diff) | |
download | tcl-024bab411658378d39fd0d8a6ce363b72cdebacd.zip tcl-024bab411658378d39fd0d8a6ce363b72cdebacd.tar.gz tcl-024bab411658378d39fd0d8a6ce363b72cdebacd.tar.bz2 |
Bug fix. Have to arrange to only close a catch once. After the space
has been returned to placeholder values, closing with them as data leads
to memory corruption.
There's probably a better fix available because the error here feels like
it's rooted somewhere else, having us continue to check values we ought to
know have already been closed.
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclAssembly.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index 6d5676b..d02721d 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -3984,6 +3984,9 @@ UnstackExpiredCatches( while (catchDepth > bbPtr->catchDepth) { --catchDepth; + if (catches[catchDepth] == NULL) { + continue; + } range = envPtr->exceptArrayPtr + catchIndices[catchDepth]; range->numCodeBytes = bbPtr->startOffset - range->codeOffset; catches[catchDepth] = NULL; |