I attached two scripts, each reproducing bugs
I found with most recent versions of XOTcl
(1.5.2/1.5.3).
Bug -1-: Argument declarations to proc/instproc
containing a single empty tcl string yield a segfault/bus error.
Bug -2-: Nesting objects through per-object evals (evals
in the object scope) yields segfaults/bus errors under
certain conditions.
all the best,
//stefan
--
Stefan Sobernig
Institute of Information Systems and New Media
Vienna University of Economics
Augasse 2-6
A - 1090 Vienna
`- +43 - 1 - 31336 - 4878 [phone]
`- +43 - 1 - 31336 - 746 [fax]
`- stefan.sobernig@wu-wien.ac.at
mailto:stefan.sobernig@wu-wien.ac.at
`- ss@thinkersfoot.net
mailto:ss@thinkersfoot.net
package req XOTcl
# / / / / / / / / / / / / / / / / / / / / /
# Bug trace -1-
# empty tcl string as argument declaration
# - - -
# stefan.sobernig@wu-wien.ac.at
# reproducable/observed for 1.5.2/1.5.3
::xotcl::Object o
o proc m1 {{}} {;}
# / / / / / / / / / / / / / / / / / / / / /
# Bug trace -2-
# Nesting through "objscoped" evals
# - - - - - - - - - - - - - - - - - - - - -
# stefan.sobernig@wu-wien.ac.at
# reproduceable/observe for 1.5.2/1.5.3
package req XOTcl
namespace import ::xotcl::*
Object o
o eval {set x [::xotcl::self]}
o set x
o eval {set x [::xotcl::self]::nested}
o set x
set cmd {::xotcl::Object [::xotcl::self]::nested}
o eval $cmd
# yields bus error
# - - -
# However, strange enough, when uncommenting lines 12-14
# the nested object is created without any
# fatal error?!
Object o
# o eval {set x [::xotcl::self]}
# o set x
# o eval {set x [::xotcl::self]::nested}
# o set x
set cmd {::xotcl::Object [::xotcl::self]::nested}
o eval $cmd
# works as expected
# - - -
# Injecting a requireNamespace makes
# the issue vanish, even with the
# pre-nesting operations being
# evaluated
Object o
o eval {set x [::xotcl::self]}
o set x
o eval {set x [::xotcl::self]::nested}
o set x
o requireNamespace
set cmd {::xotcl::Object [::xotcl::self]::nested}
o eval $cmd
# works as expected
# - - -