summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorKevin B Kenny <kennykb@acm.org>2016-05-13 00:45:55 (GMT)
committerKevin B Kenny <kennykb@acm.org>2016-05-13 00:45:55 (GMT)
commit675a0b7982d2ef03a79ee18e5f85aed8a2d34698 (patch)
tree9316ab2b0905ab5213f9fdb4e24233f83563821b /tests
parenta1f0c2b5d2b3cfff326458d9a6f5f40168c01eb3 (diff)
parentb87ec263c780440f2e79ab29f3dea7a4bf02ba1d (diff)
downloadtcl-675a0b7982d2ef03a79ee18e5f85aed8a2d34698.zip
tcl-675a0b7982d2ef03a79ee18e5f85aed8a2d34698.tar.gz
tcl-675a0b7982d2ef03a79ee18e5f85aed8a2d34698.tar.bz2
Bug fix: Assembler dereferences a rogue pointer when unstacking an empty exception range.bug_3154ea2759
Diffstat (limited to 'tests')
-rw-r--r--tests/assemble.test85
1 files changed, 85 insertions, 0 deletions
diff --git a/tests/assemble.test b/tests/assemble.test
index b0487e6..980de68 100644
--- a/tests/assemble.test
+++ b/tests/assemble.test
@@ -3279,6 +3279,91 @@ test assemble-51.4 {memory leak testing} memory {
}
}
} 0
+
+test assemble-52.1 {Bug 3154ea2759} {
+ proc __BEGIN {} {
+ ::tcl::unsupported::assemble {
+ beginCatch @badLabel
+ push error
+ push testing
+ invokeStk 2
+ pop
+ push 0
+ jump @okLabel
+ label @badLabel
+ push 1; # should be pushReturnCode
+ label @okLabel
+ endCatch
+ pop
+
+ beginCatch @badLabel2
+ push error
+ push testing
+ invokeStk 2
+ pop
+ push 0
+ jump @okLabel2
+ label @badLabel2
+ push 1; # should be pushReturnCode
+ label @okLabel2
+ endCatch
+ pop
+
+ beginCatch @badLabel3
+ push error
+ push testing
+ invokeStk 2
+ pop
+ push 0
+ jump @okLabel3
+ label @badLabel3
+ push 1; # should be pushReturnCode
+ label @okLabel3
+ endCatch
+ pop
+
+ beginCatch @badLabel4
+ push error
+ push testing
+ invokeStk 2
+ pop
+ push 0
+ jump @okLabel4
+ label @badLabel4
+ push 1; # should be pushReturnCode
+ label @okLabel4
+ endCatch
+ pop
+
+ beginCatch @badLabel5
+ push error
+ push testing
+ invokeStk 2
+ pop
+ push 0
+ jump @okLabel5
+ label @badLabel5
+ push 1; # should be pushReturnCode
+ label @okLabel5
+ endCatch
+ pop
+
+ beginCatch @badLabel6
+ push error
+ push testing
+ invokeStk 2
+ pop
+ push 0
+ jump @okLabel6
+ label @badLabel6
+ push 1; # should be pushReturnCode
+ label @okLabel6
+ endCatch
+ pop
+ }
+ }
+ __BEGIN
+} {}; # must not crash
rename fillTables {}
rename assemble {}