Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2024-08-22
19:14
Merge [7c849f60c765dd4b]: Fix [52dbc4b3f8]: tclInterp.c: Tcl_Free() called through pointer of incorr... check-in: 9c96277010 user: pooryorick tags: unchained, INCOMPATIBLE_LICENSE
2023-10-17
09:53 • Closed ticket [52dbc4b3f8]: tclInterp.c: Tcl_Free() called through pointer of in... artifact: ea4acd10d7 user: chrstphrchvz
2023-10-13
14:33
Fix [52dbc4b3f8]: tclInterp.c: Tcl_Free() called through pointer of incorrect type check-in: e75f319dc8 user: jan.nijtmans tags: core-8-6-branch
08:42 • Add attachment 52dbc4b3f8ef.diff to ticket [52dbc4b3f8ef52c4|52dbc4b3f8... artifact: 6ad574fcfc user: chrstphrchvz
08:35 • New ticket [52dbc4b3f8] tclInterp.c: Tcl_Free() called through pointer of incorr... artifact: d66bf90962 user: chrstphrchvz

tclInterp.c: Tcl_Free() called through pointer of incorrect type

Closed / Fixed52dbc4b3f8ef52c40eb8dd2080c5de48a14cd49cCreated 3 years agoUpdated 3 years ago
Descriptionwiki2023-10-13 08:35:33
Tcl_Free() is not a Tcl_LimitHandlerDeleteProc. Nothing in core Tcl calls Tcl_LimitAddHandler() with TCL_DYNAMIC as the deleteProc, but I predict that doing so would cause UBSan -fsanitize=function errors with the following:
runtime error: call to function TclpFree through pointer to incorrect function type 'void (*)(void *)'

A workaround would be to use a wrapper function; see attached patch.

Referenced by2
chrstphrchvzwiki2023-10-17 09:53:47

This was fixed in [e75f319dc8cf]. Thanks, Jan!

Log in (anonymous is fine) to add a comment.

Attachments: