Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2009-12-07
22:10 • Closed ticket [2910044fff]: memleak in try plus 7 other changes artifact: d2a2470cc1 user: dkf
22:10 • Ticket [2910044fff]: 4 changes artifact: 1093919681 user: dkf
21:50 • Ticket [2910044fff]: 4 changes artifact: fc2c269664 user: dkf
14:43 • New ticket [2910044fff]. artifact: 8c48aec7f9 user: dgp

memleak in [try]

Closed / Fixed2910044fffffffffffffffffffffffffffffffffCreated 17 years agoUpdated 17 years ago
Descriptionplain2009-12-07 14:43:16
This came across TCLCORE (unverified):

"There seems to be a memory leak in the result handler code of the C
based try command.

This leaks the result:

try {
    string repeat \0 1048576
} on ok {} {}

... this doesn't:

try {
    string repeat \0 1048576
}


Adding Tcl_DecrRefCount(resultObj); at line 4461 of generic/tclCmdMZ.c
fixes the leak for me."

Message from [email protected]
dkfplain2009-12-07 21:50:54
Confirmed with HEAD.
dkfplain2009-12-07 22:10:04
Plugged it. (There were a few edge cases with generating errors in odd spots that the suggested fix would have missed; I closed those off too.)
dkfplain2009-12-07 22:10:25
allow_comments - 1
Log in (anonymous is fine) to add a comment.