Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2008-07-22
10:35 • Ticket [1972867fff] invalid encoding caching status still Open with 4 other ... artifact: d97ff962d0 user: dgp
2008-06-20
23:18 • Ticket [1972867fff]: 6 changes artifact: 8380e31013 user: dgp
2008-06-17
03:10 • Ticket [1972867fff]: 1 change artifact: 6b506b8037 user: dgp
2008-06-09
20:46 • Ticket [1972867fff]: 4 changes artifact: e6b7e79349 user: msofer
2008-05-26
23:52 • Ticket [1972867fff]: 4 changes artifact: 5d6e9161f6 user: dkf
20:09 • Ticket [1972867fff]: 4 changes artifact: cd0d47c03d user: msofer
20:09 • Add attachment [email protected] to ticket [1972867fff] artifact: 8db002f51b user: msofer
20:08 • Add attachment uplevel.patch to ticket [1972867fff] artifact: 947eed6b28 user: msofer
20:08 • Ticket [1972867fff] invalid encoding caching status still Open with 4 other ... artifact: 354d486504 user: msofer
13:08 • New ticket [1972867fff]. artifact: a53b72b552 user: msofer

invalid encoding caching

Open1972867fffffffffffffffffffffffffffffffffCreated 19 years agoUpdated 18 years ago
Descriptionplain2008-05-26 13:08:43
Bytecompiling [uplevel]ed scripts (see uplevel.patch below) causes two failures in encoding.test: 2.2 and 11.1. Only the first is of concern, the second failure can be shown to be an artifact of the first.

The problem seems to be that when the string "shiftjis" is stored as a shared literal, its intRep is not spoiled at the appropriate time.

Please see http://paste.tclers.tk/952 for a demo of the bug in a standard tclsh, and the attached analysis (kbk at the chat).
msoferplain2008-05-26 20:08:44
File Added - 279075: uplevel.patch
msoferplain2008-05-26 20:09:41
File Added - 279076: [email protected]

Logged In: YES 
user_id=148712
Originator: YES

File Added: [email protected]
dkfplain2008-05-26 23:52:51
Logged In: YES 
user_id=79902
Originator: NO

TclOO used to hit a lot of this general sort of problem. I dealt with them by giving each object its own unique sequence number; maybe sequence/epoch numbers are the easiest way for checking whether the internal rep is valid here too?
msoferplain2008-06-09 20:46:37
Logged In: YES 
user_id=148712
Originator: YES

That patch has been committed to HEAD now
dgp Ticket [1972867fff]: 1 change [History diff]2008-06-17 03:10:49
dgpplain2008-06-20 23:18:12
Logged In: YES 
user_id=80530
Originator: NO


Added shimmer-inducing commands to the tests
so they will stop failing.

Better would be to more fully determine
what's really being tested; whether the
test is even still valid; and if so, construct
a more robust direct test, perhaps even with
a custom Tcltest command for that purpose.
dgpplain2008-07-22 10:35:20
Logged In: YES 
user_id=80530
Originator: NO


Backported same workaround to 8.5 branch
where those tests have also recently started
to fail.
Log in (anonymous is fine) to add a comment.

Attachments: