Tcl Source Code

View Ticket
Login
Ticket UUID: 3038316
Title: Encoding freeProc deadlock risk
Type: Bug Created on: 2010-08-02 14:52:44
Submitter: dgp Assigned to: dgp
Subsystem: 10. Objects Severity:
Priority: 5 Medium Last modified: 2010-08-05 15:43:26
Status: Open Closed by:
Resolution: None Closed on:
Version: None
Description:
When the Tcl_EncodingFreeProc of
an encoding is called by FreeEncoding()
the encodingMutex is held.  This means that
if the client supplied Tcl_EncodingFreeProc
calls any routine that tries to grab that mutex,
we risk a deadlock.

I suppose the best fix would be a total rewrite
of the steaming pile of WTF that is encoding
lifetime management, but short of that, perhaps
a warning in the docs?