[Xotcl] Segfault after undefining "new" proc in a class namespace
Gustaf Neumann
neumann at wu.ac.at
Fri May 25 12:06:52 CEST 2012
Dear Arthur,
What platform and what version are you using?
First of all, "nx::Class create ..." does not necessarily
create a namespace:
$ ./nxsh
% nx::Class create A {}
::A
% proc ::A::new {} { return "something" }
can't create procedure "::A::new": unknown namespace
while executing
"proc ::A::new {} { return "something" }"
When i create a class with a tcl namespace, i don't see
the problem either (using the head version)
$ ./nxsh
% nx::Class create A {:public class method foo args {}}
::A
% proc ::A::new {} { return "something" }
% rename ::A::new ""
% A new
::nsf::__#0
-gustaf neumann
On 25.05.12 11:07, Arthur Schreiber wrote:
> Hey Gustaf,
>
> The following is propably a very uncommon use case, but it causes a
> segfault, so I think it's rather serious:
>
> % package require nx
> % nx::Class create A {}
> % proc ::A::new {} { return "something" }
> % A new
> something
> % rename ::A::new ""
> % A new
> [1] 2515 segmentation fault (core dumped) tclsh
>
> Kind regards,
> Arthur
> _______________________________________________
> Xotcl mailing list
> Xotcl at alice.wu-wien.ac.at
> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl
More information about the Xotcl
mailing list