Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: a510689999763ec5290ac4fd5a2e77a0bd8e55dd778e7736ff25399b01ee90a0
Ticket: 7c2716733a526ba6d08eccbf27b6a07f8b081cff
App Verifier shows use-after-free on event handle for Windows pipes
User & Date: apnadkarni on 2025-06-13 11:13:49
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-markdown"
  4. comment changed to:
    Running the Windows application verifier on trunk shows a use after free on a Windows event handle used for exec pipes. The offending line is [here](https://core.tcl-lang.org/tcl/file?ci=950d15a307bcbf94&name=win/tclWinPipe.c&ln=3415).
    
    The `SetEvent` generally returns an invalid handle error in this case and we happily ignore the error so it is undetected and life goes on. However, if by chance (however small) the handle value were to be reused by Windows for a different handle, unexpected behaviour would occur as it would not be treated as an invalid handle.
    
    This should be afforded the same level of importance as a user-after-free detected by valgrind.
    
  5. foundin changed to: "trunk"
  6. is_private changed to: "0"
  7. login: "apnadkarni"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "9546e9877f1a8899e25a89082561ee694e7fb402"
  10. resolution changed to: "None"
  11. severity changed to: "Important"
  12. status changed to: "Open"
  13. submitter changed to: "apnadkarni"
  14. subsystem changed to: "- New Builtin Commands"
  15. title changed to:
    App Verifier shows use-after-free on event handle for Windows pipes
    
  16. type changed to: "Bug"