View · Search · Index
No registered users in community xowiki
in last 10 minutes

Re: [Xotcl] Segfault after undefining "new" proc in a class namespace

From: Gustaf Neumann <neumann_at_wu.ac.at>
Date: Fri, 25 May 2012 12:06:52 +0200

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