No registered users in community xowiki
in last 10 minutes
in last 10 minutes
[Xotcl] two crashy issues // 1.5.x
From: Stefan Sobernig <stefan.sobernig_at_wu-wien.ac.at>
Date: Mon, 23 Jul 2007 18:23:51 +0200
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
package req XOTcl
# / / / / / / / / / / / / / / / / / / / / /
# Bug trace -1-
# empty tcl string as argument declaration
# - - -
# stefan.sobernig_at_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_at_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
# - - -
Date: Mon, 23 Jul 2007 18:23:51 +0200
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_at_wu-wien.ac.at <mailto:stefan.sobernig_at_wu-wien.ac.at> `- ss_at_thinkersfoot.net <mailto:ss_at_thinkersfoot.net>
package req XOTcl
# / / / / / / / / / / / / / / / / / / / / /
# Bug trace -1-
# empty tcl string as argument declaration
# - - -
# stefan.sobernig_at_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_at_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
# - - -