Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: e8f386d14828ba160727d7212e56b0ab543abfff6468fd52bf87c05dc87948f7
Ticket: 07563f771f53df48b2cf83286231eedf1e4fbe68
Segfault when changing encoding on stdout
User & Date: anonymous on 2022-11-23 01:27:59
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    On macOS 12.6 with Tcl built from MacPorts the following crashes:
    
        fconfigure -encoding binary stdout
    
    The back trace is as follows:
    ```
    (lldb) run
    Process 84993 launched: '/usr/local/bin/tclsh9.0' (x86_64)
    can't find package tclreadline
    % fconfigure stdout -encoding binary
    alloc: invalid block: 0x108039070: 50 1
    Process 84993 stopped
    * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
        frame #0: 0x000000010045eb5b Tcl`Tcl_Panic + 443
    Tcl`Tcl_Panic:
    ->  0x10045eb5b <+443>: ud2
        0x10045eb5d <+445>: subq   $0x8, %rsp
        0x10045eb61 <+449>: movq   %r11, %rdi
        0x10045eb64 <+452>: movq   %rdx, %rsi
    Target 0: (tclsh9.0) stopped.
    (lldb) bt
    * thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BAD_INSTRUCTION (code=EXC_I386_INVOP, subcode=0x0)
      * frame #0: 0x000000010045eb5b Tcl`Tcl_Panic + 443
        frame #1: 0x000000010047e401 Tcl`TclpFree + 513
        frame #2: 0x000000010045be31 Tcl`TclFreeObj + 225
        frame #3: 0x0000000100439935 Tcl`Tcl_WriteChars + 357
        frame #4: 0x0000000100454d8d Tcl`___lldb_unnamed_symbol2065 + 237
        frame #5: 0x0000000100454741 Tcl`Tcl_MainEx + 1569
        frame #6: 0x0000000100003a18 tclsh9.0`___lldb_unnamed_symbol10 + 72
        frame #7: 0x000000010001252e dyld`start + 462
    ```
    
  5. foundin changed to: "9.0a4"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "b21760a8b5b8a20b0039089d843204d8b7262595"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "24. Channel Commands"
  15. title changed to: "Segfault when changing encoding on stdout"
  16. type changed to: "Bug"