Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2013-02-06
03:57 • Ticket [3601784fff] checkin 8e20d1a93f breaks Tk status still Closed with 4... artifact: 9f846d5e9f user: dkf
00:45 • Closed ticket [3601784fff]. artifact: 0db3d8c535 user: dgp
00:45 • Ticket [3601784fff]: 4 changes artifact: 525e90f8e0 user: dgp
00:44 • Ticket [3601784fff]: 4 changes artifact: b2b651a34f user: dgp
00:18 • Ticket [3601784fff]: 4 changes artifact: c1e9e1adcd user: dgp
2013-01-23
00:28 • Ticket [3601784fff]: 4 changes artifact: cb42a84cba user: dgp
00:22 • Ticket [3601784fff]: 4 changes artifact: 58f7de1d16 user: dgp
2013-01-22
17:15 • New ticket [3601784fff]. artifact: f088b794e1 user: dgp

checkin 8e20d1a93f breaks Tk

Closed / Fixed3601784fffffffffffffffffffffffffffffffffCreated 14 years agoUpdated 14 years ago
Descriptionplain2013-01-22 17:15:11
Starting with the Tcl trunk checkin

    http://core.tcl.tk/tcl/info/8e20d1a93f

The Tk test suite starts failing tests.
Representative test is bitmap-4.1:

==== bitmap-4.1 FreeBitmapObjProc FAILED
==== Contents of test case:

    set x [format questhead]
    button .b -bitmap $x
    set y [format questhead]
    .b configure -bitmap $y
    set z [format questhead]
    .b configure -bitmap $z
    set result {}
    lappend result [testbitmap questhead]
    set x red
    lappend result [testbitmap questhead]
    set z 32
    lappend result [testbitmap questhead]
    destroy .b
    lappend result [testbitmap questhead]
    set y bogus
    return $result

---- Result was:
{{1 1}} {{1 1}} {{1 1}} {}
---- Result should have been (exact matching):
{{1 3}} {{1 2}} {{1 1}} {}
==== bitmap-4.1 FAILED

Do the testing with Tk 8.6.0 sources.  Tk trunk
no longer permits it. See Tk Bug 3601782
dgpplain2013-01-23 00:22:25
Looking in more detail, this may really be
a Tk bug in the sense of a fragile testing command.

The changed values are objRefCount fields
counting how many Tcl_Obj structs hold a
(TkBitmap *) to the struct.  These values
might easily change with different shimmer
and share patterns arising from changes to
Tcl that do not indicate any actual failure to
function correctly.
dgpplain2013-01-23 00:28:14
Other tests that appear to suffer the
same issue are border-3.1, cursor-4.1,
font-18.1.
dgpplain2013-02-06 00:18:26
The new bytecompiled [format] is the trigger,
changing the pattern of sharing literals.
dgpplain2013-02-06 00:44:43
Rethinking this throroughly is outside my
arena.  More modestly I notice that
replacing [format] with [join] makes things
behave again.
dgpplain2013-02-06 00:45:24
Fixed on Tk trunk.
dgpplain2013-02-06 00:45:25
allow_comments - 1
dkfplain2013-02-06 03:57:55
Oh I see; the tests really wanted unshared objects and I modified [format] so that (among other things) [format %s $foo] is equivalent to $foo. Which is true, except for code that's testing reference counts and stuff like that.

Something like [string reverse] twice would un-reference the value while preserving the character sequence.
Log in (anonymous is fine) to add a comment.