Overview
| Artifact ID: | 304ff36a6012fe81df3ef4d7548095d7e0791beb |
|---|---|
| Ticket: | 268b23df11916a9da17742ce2595d0634f5a0960
expr Crashes When Traced |
| User & Date: | tomkiti on 2015-06-01 17:23:43 |
Changes
- assignee changed to: "nobody"
- closer changed to: "nobody"
- cmimetype changed to: "text/plain"
- comment changed to:
The "expr" command crashes tclsh when it is being traced while evaluating a built-in function with a command argument. This can be reproduced with the following script: proc zero {} { return 0 } proc crash {} { expr {abs([zero])} ;# <=== Crashes } proc traceProc {args} { } trace add execution crash enterstep traceProc crash Some observations: - The "leavestep" trace also crashes, but "enter" and "leave" do not. - All "expr" functions seem to crash, not just "abs". - For the crash to occur, the argument to the function must be a command, e.g. "[zero]". Passing "0", "[return 0]", or a variable will not crash. - Removing the braces will prevent the crash. - Removing the trace will prevent the crash. The workaround is to set the command's result to a variable first and then pass the variable to the "abs" function. - foundin changed to: "8.6.4"
- is_private changed to: "0"
- login: "tomkiti"
- priority changed to: "5 Medium"
- private_contact changed to: "1c57e67924247fd7926e89348f266c081ec57db2"
- resolution changed to: "None"
- severity changed to: "Minor"
- status changed to: "Open"
- submitter changed to: "tomkiti"
- subsystem changed to: "16. Commands A-H"
- title changed to: "expr Crashes When Traced"
- type changed to: "Bug"