Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: f6e3968cbc8209c8982edd412e99a4217e8531df01adcc39c08b07df0b319b5d
Ticket: 26870862f0e8884eaec02c5a3bbc4caf2431a310
Wrong sentinel in Tcl_SetErrorCode usage
User & Date: jan.nijtmans on 2023-10-15 11:51:16
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-wiki"
  4. comment changed to:
    In tclAssembly.c, lines 2014 and 3454, the Tcl_SetErrorCode() is not properly ended with NULL. Adding compiler checks for this results in:
    <pre>
    generic/tclAssembly.c:2014:63: warning: missing sentinel in function call [-Wsentinel]
                    Tcl_SetErrorCode(interp, "TCL", "ASSEM", "DUPJUMPTABLEENTRY");
                                                                                ^
    generic/tclAssembly.c:3454:64: warning: missing sentinel in function call [-Wsentinel]
                Tcl_SetErrorCode(interp, "TCL", "ASSEM", "BADSTACKINCATCH", -1);
                                                                              ^
    </pre>
    
    Those two instances will lead to a crash, when encoungered. Apparently, there is no testcase for it (which would - indeed - be difficult to write)
    
    It would be good to implement compiler-checks for this, even in 8.6
    
  5. foundin changed to: "8.6"
  6. is_private changed to: "0"
  7. login: "jan.nijtmans"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "0c50e5320704d174412e57b873d8932de15303e0"
  10. resolution changed to: "None"
  11. severity changed to: "Critical"
  12. status changed to: "Open"
  13. submitter changed to: "jan.nijtmans"
  14. subsystem changed to: "52. Portability Support"
  15. title changed to: "Wrong sentinel in Tcl_SetErrorCode usage"
  16. type changed to: "Bug"