Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 63694313f7d4934c95f3c0d85889c8bebb723ec3666137600509d7c8d0f383ee
Ticket: db4f2843cdb28c27fddf511567bc9287484852ae
Sporadic segfault (BO) using tclIO
User & Date: sebres on 2024-01-23 00:35:43
Changes

  1. icomment:
    No, it wouldn't help. Moreover it'd completely regress (would probably have still worse performance than my initial fix) because would "remove" previously enlarged buffer on every iteration. 
    
    Even if the object is utf-8 append makes a string, that doesn't have unicode, but contains info in stringPtr about the bytes buffer. The removal of internal representation would simply cause that info like stringPtr->allocated get lost.
    
    Basically, the simplest fix could be to declare AppendUtfToUtfRep as internal TclAppendUtfToUtfRep and call it instead of Tcl_AppendToObj.
    
  2. login: "sebres"
  3. mimetype: "text/x-fossil-wiki"