diff options
author | fvogel <fvogelnew1@free.fr> | 2023-09-01 19:25:02 (GMT) |
---|---|---|
committer | fvogel <fvogelnew1@free.fr> | 2023-09-01 19:25:02 (GMT) |
commit | ccff980b5f424e4ebeac80d0b95c9b3059fcf2a8 (patch) | |
tree | e2a14699b7adcfcdbe95a95711c9d2486cae2f60 /tests | |
parent | 7ad3f205d21d255bd6efc0ef63417594654b7a01 (diff) | |
parent | 2aaf606a52bebaea0964d0f5baaa8d749eaf3f90 (diff) | |
download | tk-ccff980b5f424e4ebeac80d0b95c9b3059fcf2a8.zip tk-ccff980b5f424e4ebeac80d0b95c9b3059fcf2a8.tar.gz tk-ccff980b5f424e4ebeac80d0b95c9b3059fcf2a8.tar.bz2 |
Change menu test number: menu-41.1 --> menu-39.2
Diffstat (limited to 'tests')
-rw-r--r-- | tests/menu.test | 35 |
1 files changed, 18 insertions, 17 deletions
diff --git a/tests/menu.test b/tests/menu.test index 7c816ce..1c45e11 100644 --- a/tests/menu.test +++ b/tests/menu.test @@ -4100,6 +4100,24 @@ test menu-39.1 {empty -type - bug be8f5b9fc2} -setup { destroy .m } -returnCodes error -result {ambiguous type "": must be menubar, normal, or tearoff} +test menu-39.2 {use-after-free fix - bug 1797555fff} -setup { + toplevel .t + menu .t.menubar -type menubar + menu .t.menubar.select -title Select + menu .t.menubar.select.chain -title Chain + .t.menubar.select insert 1 cascade -menu .t.menubar.select.chain -label Chain + .t.menubar add cascade -menu .t.menubar.select -label Select + .t configure -menu .t.menubar + .t.menubar.select.chain insert 1 command + update idletasks +} -body { + # The following two lines caused Tk to read from and write to freed memory + destroy .t.menubar.select.chain + .t.menubar.select delete 1 +} -cleanup { + destroy .t +} -result {} + test menu-40.1 {identifiers - auto generated} -setup { destroy .m } -body { @@ -4252,23 +4270,6 @@ test menu-40.14 {identifiers - reserved word} -setup { destroy .m } -result {2} -test menu-41.1 {use-after-free fix - bug 1797555fff} -setup { - toplevel .t - menu .t.menubar -type menubar - menu .t.menubar.select -title Select - menu .t.menubar.select.chain -title Chain - .t.menubar.select insert 1 cascade -menu .t.menubar.select.chain -label Chain - .t.menubar add cascade -menu .t.menubar.select -label Select - .t configure -menu .t.menubar - .t.menubar.select.chain insert 1 command - update idletasks -} -body { - # The following two lines caused Tk to read from and write to freed memory - destroy .t.menubar.select.chain - .t.menubar.select delete 1 -} -cleanup { - destroy .t -} -result {} # cleanup imageFinish |