diff options
author | dgp <dgp@users.sourceforge.net> | 2017-12-05 15:52:55 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-12-05 15:52:55 (GMT) |
commit | 72f0f0b3468809e3a3a26e448b3bd3be8a8398a6 (patch) | |
tree | 8c8c8d840ac48b79e20f854642820a7c2cfdd268 /tests | |
parent | f0d821a83cc98067d756402bebd4d941aa7e6cff (diff) | |
parent | f3af86c67e61eaba34af3d25e883ae3e9fc83099 (diff) | |
download | tcl-72f0f0b3468809e3a3a26e448b3bd3be8a8398a6.zip tcl-72f0f0b3468809e3a3a26e448b3bd3be8a8398a6.tar.gz tcl-72f0f0b3468809e3a3a26e448b3bd3be8a8398a6.tar.bz2 |
[4f6a1ebd64] Stop crash when same value passed to the -map and -subcommands options of ensemble configuration.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/namespace.test | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/namespace.test b/tests/namespace.test index 5387ae8..9fa9331 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -1808,14 +1808,29 @@ test namespace-42.9 { deallocated List struct. } -setup { namespace eval n {namespace ensemble create} - dict set list one ::two - namespace ensemble configure n -subcommands $list -map $list + set lst [dict create one ::two] + namespace ensemble configure n -subcommands $lst -map $lst } -body { n one } -cleanup { namespace delete n + unset -nocomplain lst } -returnCodes error -match glob -result {invalid command name*} +test namespace-42.10 { + ensembles: [Bug 4f6a1ebd64] segmentation fault due to pointer to a + deallocated List struct (this time with duplicate of one in "dict"). +} -setup { + namespace eval n {namespace ensemble create} + set lst [list one ::two one ::three] + namespace ensemble configure n -subcommands $lst -map $lst +} -body { + n one +} -cleanup { + namespace delete n + unset -nocomplain lst +} -returnCodes error -match glob -result {invalid command name *three*} + test namespace-43.1 {ensembles: dict-driven} { namespace eval ns { namespace export x* |