Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 3a6da0e4ebc390d2897289cde09d550de75c4bb90330d5ba5526cba524e9f901
Ticket: e533296a92d890449603ce54a5b1e2f04912e68a
SegFault on [info frame] on apply
User & Date: sebres on 2026-08-27 10:23:36
Changes

  1. icomment:
    I think setting `hPtr = NULL` before freeing memory is a dirty workaround, because it'd imply use after free (worse enough), as well as that the memory behind `hPtr` remains unchanged. It is bad idea.
    
    As for Ashok's analyze, the mentioned overwrite looks like an after effect to me -the cmd pointer used in Tcl_ApplyObjCmd for procPtr is reserved in program stack and without the reset (leaving Tcl_ApplyObjCmd) a usage after free is possible there too. But as I said before, I also think that this would require further investigation. Unfortunately I cannot backport correct fix, because my TEBC uses completely different cmd-location approach (without scriptCLLocPtr and co) - the way how it gets "compiled" is simply different.
    
  2. login: "sebres"
  3. mimetype: "text/x-markdown"