#4010 invalid encoding caching

obsolete: 8.6a0
open
2
2008-06-20
2008-05-26
No

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).

Discussion

  • miguel sofer

    miguel sofer - 2008-05-26
     
  • miguel sofer

    miguel sofer - 2008-05-26

    analysis

     
  • miguel sofer

    miguel sofer - 2008-05-26

    Logged In: YES
    user_id=148712
    Originator: YES

    File Added: kbk@chat.txt

     
  • Donal K. Fellows

    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?

     
  • miguel sofer

    miguel sofer - 2008-06-09

    Logged In: YES
    user_id=148712
    Originator: YES

    That patch has been committed to HEAD now

     
  • Don Porter

    Don Porter - 2008-06-16
    • priority: 5 --> 9
     
  • Don Porter

    Don Porter - 2008-06-20
    • labels: --> 10. Objects
    • priority: 9 --> 2
     
  • Don Porter

    Don Porter - 2008-06-20

    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.

     
  • Don Porter

    Don Porter - 2008-07-22

    Logged In: YES
    user_id=80530
    Originator: NO

    Backported same workaround to 8.5 branch
    where those tests have also recently started
    to fail.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks