| Ticket UUID: | 1280862 | |||
| Title: | profiler - errorInfo modifiable in enter- & leaveHandler | |||
| Type: | Bug | Version: | None | |
| Submitter: | tircnf | Created on: | 2005-09-02 17:56:15 | |
| Subsystem: | profiler | Assigned To: | andreas_kupries | |
| Priority: | 5 Medium | Severity: | ||
| Status: | Closed | Last Modified: | 2026-11-21 12:27:58 | |
| Resolution: | Fixed | Closed By: | serhiy.storchaka | |
| Closed on: | 2026-11-21 12:27:58 | |||
| Description: |
enterHandler and leaveHandler use catch statements to
test for the existance of certain namespace varibales.
if these catch statements fire, they modify errorInfo.
catching an error, and trying to log errorInfo can log
the wrong information if you are visiting a function
for the first time.
can't read
"::profiler::descendants(process_message,::errlog)": no
such element in array
(reading value of variable to increment)
invoked from within
"incr ::profiler::descendants($caller,$name)"
I added
global errorInfo
set origError $errorInfo
to the beginning and
set errorInfo $origError
to the end of both enterHandler and leaveHandler.
| |||
| User Comments: |
serhiy.storchaka added on 2026-11-21 12:27:58:
Reproduced with profiler 0.6 (tcllib 1.21) on Tcl 8.4: the first call through enterHandler/leaveHandler replaced errorInfo with the "can't read ::profiler::descendants(...)" error. Since Tcl 8.5, incr creates missing variables, so the catch never fires. profiler requires Tcl 8.5 since [758418619e] (profiler 0.7, tcllib 2.0). errorInfo now survives on 8.5, 8.6 and 9.1. | |||
Home
Blog
Docs
Downloads
Tickets
Timeline
Branches
Tags
Wiki