summaryrefslogtreecommitdiffstats
path: root/tests/execute.test
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-06-03 12:26:38 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-06-03 12:26:38 (GMT)
commit0c2604871db8e162533e9729c9e5201334510785 (patch)
tree9107484dfcc509b829cbfc5bfccd0b339702ebe8 /tests/execute.test
parent32461a99d3dc5741caf2f1c282ca57fe06220b79 (diff)
downloadtcl-0c2604871db8e162533e9729c9e5201334510785.zip
tcl-0c2604871db8e162533e9729c9e5201334510785.tar.gz
tcl-0c2604871db8e162533e9729c9e5201334510785.tar.bz2
[268b23df11] When GetSrcInfoForPc() returns NULL, make sure it also sets
the length to a non-positive value so nothing tries to read offsets from a NULL pointer.
Diffstat (limited to 'tests/execute.test')
-rw-r--r--tests/execute.test14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/execute.test b/tests/execute.test
index 94af158..aaf4bc0 100644
--- a/tests/execute.test
+++ b/tests/execute.test
@@ -1043,6 +1043,20 @@ test execute-11.1 {Bug 3142026: GrowEvaluationStack off-by-one} -setup {
} -cleanup {
interp delete slave
} -result ok
+
+test execute-11.2 {Bug 268b23df11} -setup {
+ proc zero {} {return 0}
+ proc crash {} {expr {abs([zero])}}
+ proc noop args {}
+ trace add execution crash enterstep noop
+} -body {
+ crash
+} -cleanup {
+ trace remove execution crash enterstep noop
+ rename noop {}
+ rename crash {}
+ rename zero {}
+} -result 0
# cleanup
if {[info commands testobj] != {}} {