Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2022-11-23
21:24 • Closed ticket [07563f771f]: Segfault when changing encoding on stdout plus 7... artifact: 17e865d39a user: jan.nijtmans
07:56 • Ticket [da63e4c1ef] Crash in Tcl_WriteChars() status still Open with 4 other... artifact: c3514056b9 user: jan.nijtmans
07:49 • Ticket [07563f771f] Segfault when changing encoding on stdout status still O... artifact: 4ea9cafb4d user: jan.nijtmans
02:55 • Ticket [07563f771f]: 3 changes artifact: b6f8cfe17b user: pointsman
01:27 • New ticket [07563f771f]. artifact: e8f386d148 user: anonymous

Segfault when changing encoding on stdout

Closed / Fixed07563f771f53df48b2cf83286231eedf1e4fbe68Created 4 years agoUpdated 4 years ago
Descriptionmarkdown2022-11-23 01:27:59

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 TclTcl_Panic + 443 TclTcl_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 TclTcl_Panic + 443 frame #1: 0x000000010047e401 TclTclpFree + 513 frame #2: 0x000000010045be31 TclTclFreeObj + 225 frame #3: 0x0000000100439935 TclTcl_WriteChars + 357 frame #4: 0x0000000100454d8d Tcl___lldb_unnamed_symbol2065 + 237 frame #5: 0x0000000100454741 TclTcl_MainEx + 1569 frame #6: 0x0000000100003a18 tclsh9.0___lldb_unnamed_symbol10 + 72 frame #7: 0x000000010001252e dyldstart + 462 ```
pointsmanplain2022-11-23 02:55:01
On debian 11.5:

% info patchlevel
9.0a4
% fconfigure stdout -encoding binary
alloc: invalid block: 0x55d572641fc0: 20 72
jan.nijtmanswiki2022-11-23 07:49:47

Most likely, dup of [da63e4c1e]

jan.nijtmanswiki2022-11-23 21:24:39

Fixed [here]

Log in (anonymous is fine) to add a comment.