Menu

#2420 unexpected stack trace in "unknown"

obsolete: 8.5a0
closed-duplicate
5
2003-07-17
2003-07-16
No

This script illustrates the problem:

set auto_index(foo) [list proc foo {args} { return -code
1 "cancel" }]
set blah [string repeat "\u2022abcdefg " 20]
foo $blah

The problem arises because unknown makes a string
comparison using 'string length', whereas the core code,
it seems uses the first 160 bytes rather than chars of
the string.

If we remove the '\u2022' unicode sequence from 'blah',
then all is ok.

Discussion

  • Vince Darley

    Vince Darley - 2003-07-16

    Logged In: YES
    user_id=32170

    Searching for '150' in tcl/generic shows a number of places
    where there may be problems. It wouldn't surprise me if multi-
    byte characters are even split into pieces by the core code.

     
  • Don Porter

    Don Porter - 2003-07-16
    • summary: tip#90 Tcl bug: unexpected stack trace in "unknown" --> unexpected stack trace in "unknown"
    • status: open --> pending-duplicate
     
  • Don Porter

    Don Porter - 2003-07-16

    Logged In: YES
    user_id=80530

    this appears to be a duplicate
    of Bug 760872.

    And has nothing to do with TIP 90.

     
  • Vince Darley

    Vince Darley - 2003-07-17

    Logged In: YES
    user_id=32170

    Ok -- thanks. Looking more closely at the code it is clearly
    only coincidence that I've just seen the bug since tip90, since
    it has always been there.

     
  • Vince Darley

    Vince Darley - 2003-07-17
    • status: pending-duplicate --> open-duplicate
     
  • Don Porter

    Don Porter - 2003-07-17
    • status: open-duplicate --> closed-duplicate
     
MongoDB Logo MongoDB