Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 99a5c2cd51a7c3a5d4940262f416b813f46ef62bb2ff4a93c777fee9130e40c1
Ticket: 8e666d7c956372d0df195e27d36a53fdbad9164d
Redefining proc ::history locks the interpreter into a tight loop
User & Date: kjnash on 2024-02-03 14:36:50
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/x-fossil-plain"
  4. comment changed to:
    While investigating [fe4d7305a8], which has been fixed, I found another bug.
    
    ::history is a proc that calls the binary command ::tcl::history.  If ::history is renamed or deleted, the interpreter regenerates the proc ::history so that the immediate call of ::history to record the history does not fail.
    
    Ideally the user would be able to redefine proc ::history, to provide an alternative to the Tcl built-in command.  However, the attempt causes the interpreter to cease functioning, even if the new proc is identical to the old.  The interpreter appears to enter a tight CPU-consuming loop, while never reaching the point where it can accept another command.
    
  5. foundin changed to: "8.6.13, 8.7"
  6. is_private changed to: "0"
  7. login: "kjnash"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "a774b1f5653dc3360e29ea7d635a64e94c9f1dab"
  10. resolution changed to: "None"
  11. severity changed to: "Minor"
  12. status changed to: "Open"
  13. submitter changed to: "kjnash"
  14. subsystem changed to: "19. [history]"
  15. title changed to:
    Redefining proc ::history locks the interpreter into a tight loop
    
  16. type changed to: "Bug"