Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 1036fbd00a8bffa9c6c52a965c4e6f5e5c92b3f1e45670e8060f0bb7017a830c
Ticket: 1004065fffffffffffffffffffffffffffffffff
UTF-8 encoding crashes in UCS-4 mode
User & Date: dgp on 2020-04-21 15:49:16
Changes

  1. assignee changed to: "dgp"
  2. closer changed to: "nobody"
  3. comment changed to:
    I built Tcl 8.4.7 by setting TCL_UTF_MAX to 6 in tcl.h
    (changed from 3). I then run the command
    
    set x [encoding convertfrom utf-8 \xf0\x9d\x99\xaf]
    
    Tcl crashes with the traceback
    
    #0  0x080994e7 in TableFromUtfProc (clientData=0x810acb0,
        src=0x8115960 "ð\235\231¯ð\213\030@# Default system
    startup file for Tcl-based applications.  Defines\n#
    \"unknown\" procedure and auto-load facilities.\n#\n#
    RCS: @(#) $Id: init.tcl,v 1.55.2.3 2004/05/03 14:28:59
    dgp Exp $\n#\n# Copy"..., srcLen=4, flags=0,
    statePtr=0x8114b04, dst=0x8116988 "% ", dstLen=4111,
    srcReadPtr=0xbffff068,
        dstWrotePtr=0xbffff074, dstCharsPtr=0xbfffefe0) at
    ../generic/tclEncoding.c:2353
    #1  0x08097a22 in Tcl_UtfToExternal (interp=0x0,
    encoding=0x810adc0,
        src=0x8115960 "ð\235\231¯ð\213\030@# Default system
    startup file for Tcl-based applications.  Defines\n#
    \"unknown\" procedure and auto-load facilities.\n#\n#
    RCS: @(#) $Id: init.tcl,v 1.55.2.3 2004/05/03 14:28:59
    dgp Exp $\n#\n# Copy"..., srcLen=4, flags=0,
    statePtr=0x8114b04, dst=0x8116988 "% ", dstLen=4111,
    srcReadPtr=0xbffff068,
        dstWrotePtr=0xbffff074, dstCharsPtr=0xbfffefe0) at
    ../generic/tclEncoding.c:1091
    #2  0x080b2848 in WriteChars (chanPtr=0x8115940,
    src=0x811a59c "", srcLen=0) at ../generic/tclIO.c:3170
    #3  0x080b24b7 in Tcl_WriteObj (chan=0x8115940,
    objPtr=0x81140e8) at ../generic/tclIO.c:2960
    #4  0x08055128 in Tcl_Main (argc=1, argv=0xbffff2f4,
    appInitProc=0x80549e6 <Tcl_AppInit>)
        at ../generic/tclMain.c:407
    #5  0x080549dc in main (argc=1, argv=0xbffff2f4) at
    ../unix/tclAppInit.c:90
    
    This is all on a Debian system.
    
  4. login: "dgp"
  5. mimetype: "text/plain"
  6. priority changed to: "7 High"
  7. severity changed to: "Minor"