Tk Library Source Code

View Ticket
Login
Ticket UUID: 1566434
Title: stooop-87 fails with Tcl 8.5
Type: Bug Version: None
Submitter: dgp Created on: 2006-09-27 16:03:45
Subsystem: stooop Assigned To: jfontain
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2006-10-03 23:47:37
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2006-10-03 16:47:37
Description:
In stooop-4.4.1 (tcllib-1.9-rc1):

==== stooop-87 verify member writing and unsetting
within class namespaces in member data checking mode
(it seems that unset tracing prevents error reporting
at this time (bug?)) FAILED
==== Contents of test case:

    set interpreter [interp create]
    $interpreter eval {
        # reset any existing environment variables:
        foreach name [array names env STOOOP*] {unset
env($name)}
        set env(STOOOPCHECKDATA) 1
    }
    $interpreter eval "source $source; namespace import
stooop::*"
    set result [$interpreter eval {
        class a {
            set (m) 0
        }
        proc a::a {this} {
            set ($this,n) 0
        }
        proc a::~a {this} {}
        set o [new a]
        catch {class b {incr a::(m)}} message; lappend
::result $message
        catch {class b {incr a::($o,n)}} message;
lappend ::result $message
        catch {class b {unset a::(m)}} message; lappend
::result bug
        catch {class b {unset a::($o,n)}} message;
lappend ::result bug
        delete $o

        class A {
            set (m) 0
            proc A {this} {
                set ($this,n) 0
            }
            proc ~A {this} {}
        }
        set o [new A]
        class B {
            catch {incr A::(m)} message; lappend
::result $message
            catch {incr A::($o,n)} message; lappend
::result $message
            catch {unset A::(m)} message; lappend
::result bug
            catch {unset A::($o,n)} message; lappend
::result bug
        }
        delete $o

        class c {}
        class c::d {
            set (m) 0
        }
        proc c::d::d {this} {
            set ($this,n) 0
        }
        proc c::d::~d {this} {}
        set o [new c::d]
        catch {class c::e {incr c::d::(m)}} message;
lappend ::result $message
        catch {class c::e {incr c::d::($o,n)}} message;
lappend ::result $message
        catch {class c::e {unset c::d::(m)}} message;
lappend ::result bug
        catch {class c::e {unset c::d::($o,n)}}
message; lappend ::result bug
        delete $o

        class C {
            class D {
                set (m) 0
                proc D {this} {
                    set ($this,n) 0
                }
                proc ~D {this} {}
            }
            set ::o [new D]
            class B {
                catch {incr C::D::(m)} message; lappend
::result $message
                catch {incr C::D::($o,n)} message;
lappend ::result $message
                catch {unset C::D::(m)} message;
lappend ::result bug
                catch {unset C::D::($o,n)} message;
lappend ::result bug
            }
        }
        catch {incr C::D::(m)} message; lappend
::result $message
        catch {incr C::D::($o,n)} message; lappend
::result $message
        catch {unset C::D::(m)} message; lappend
::result bug
        catch {unset C::D::($o,n)} message; lappend
::result bug
        delete $o

        set ::result
    }]
    interp delete $interpreter
    set result

---- Result was:
{can't set "a::(m)": class access violation in class b
namespace} {can't set "a::(1,n)": class access
violation in class b namespace} bug bug {can't set
"A::(m)": class access violation in class B namespace}
{can't set "A::(2,n)": class access violation in class
B namespace} bug bug {can't set "c::d::(m)": class
access violation in class c::e namespace} {can't set
"c::d::(3,n)": class access violation in class c::e
namespace} bug bug {can't set "C::D::(m)": class access
violation in class C::B namespace} {can't set
"C::D::(4,n)": class access violation in class C::B
namespace} bug bug 1 1 bug bug
---- Result should have been (exact matching):
{can't set "a::(m)": class access violation in class b
namespace} {can't set "a::(1,n)": class access
violation in class b namespace} bug bug {can't set
"A::(m)": class access violation in class B namespace}
{can't set "A::(2,n)": class access violation in class
B namespace} bug bug {can't set "c::d::(m)": class
access violation in class c::e namespace} {can't set
"c::d::(3,n)": class access violation in class c::e
namespace} bug bug {can't set "C::D::(m)": class access
violation in class C::B namespace} {can't set
"C::D::(4,n)": class access violation in class C::B
namespace} bug bug {can't read "C::D::(m)": no such
element in array} {can't read "C::D::(4,n)": no such
element in array} bug bug
==== stooop-87 FAILED
User Comments: andreas_kupries added on 2006-10-03 23:47:37:
Logged In: YES 
user_id=75003

Thanks Jean-Luc for the quick investigation and work. I saw
your commit and tested it, the testcase is not failing
anymore. I will now close the report.

andreas_kupries added on 2006-10-03 03:05:58:
Logged In: YES 
user_id=75003

I expected that answer ... Ok, if you manage we can put into
the release, otherwise it has to wait for the next, and I
hope that you will not min that. As it affects only the 8.5
alpha it can be considered as relatively low-priority. On
the other hand, several tcllib math failures uncovered bugs
in the rewritten Tcl 8.5 number handling, so we should not
leave it uninvestigated.

jfontain added on 2006-10-03 03:00:40:
Logged In: YES 
user_id=376942

I don't think I'll be done in 2 days, maybe, but not for
sure... Sorry.

andreas_kupries added on 2006-10-03 02:17:08:
Logged In: YES 
user_id=75003

Thanks. I have to ask 'how quick' ? The testsuite is failure
free for 8.4, the main release of the core, and the plan was
to go final this evening (Monday Oct 2). I could move that
one, at most two days, but no longer, as I want to have GA
well before the conference.

jfontain added on 2006-10-02 02:13:40:
Logged In: YES 
user_id=376942

I'll get to it this week.