summaryrefslogtreecommitdiffstats
path: root/tests/execute.test
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2015-06-03 12:26:38 (GMT)
committerdgp@users.sourceforge.net <dgp>2015-06-03 12:26:38 (GMT)
commit23a496d954de0ceaabbf92d01e4ab3cd32f4e8b9 (patch)
tree9107484dfcc509b829cbfc5bfccd0b339702ebe8 /tests/execute.test
parente4f2fbcedb760b8fa338782579072f330cac432b (diff)
downloadtcl-23a496d954de0ceaabbf92d01e4ab3cd32f4e8b9.zip
tcl-23a496d954de0ceaabbf92d01e4ab3cd32f4e8b9.tar.gz
tcl-23a496d954de0ceaabbf92d01e4ab3cd32f4e8b9.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] != {}} {