diff options
author | dgp <dgp@users.sourceforge.net> | 2017-12-04 18:36:14 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2017-12-04 18:36:14 (GMT) |
commit | 92f8ce13dfb1299030dc844252d7478caaaa7687 (patch) | |
tree | 35b94b3f35634f2300cfaec0a988a33856890f0b /tests/namespace.test | |
parent | e68b4918069d622ccc7f9f6f98e8432df3f3baad (diff) | |
download | tcl-92f8ce13dfb1299030dc844252d7478caaaa7687.zip tcl-92f8ce13dfb1299030dc844252d7478caaaa7687.tar.gz tcl-92f8ce13dfb1299030dc844252d7478caaaa7687.tar.bz2 |
[4f6a1ebd64] Different fix for the problem. Re-order the filling of the
subcommand table so there is no longer a conflict where multiple intreps of
a single value are sought. If the mapDict and exportList are the same,
then each key in the mapDict is known to be an element of the exportList
without needing to check.
Diffstat (limited to 'tests/namespace.test')
-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 7d41258..0ad8451 100644 --- a/tests/namespace.test +++ b/tests/namespace.test @@ -1599,14 +1599,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* |