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
9c96277010Merge [7c849f60c765dd4b]: Fix [52dbc4b3f8]: tclInterp.c: Tcl_Free() called through pointer of incorrect type. check-in2024-08-22 19:14:05e75f319dc8Fix [52dbc4b3f8]: tclInterp.c: Tcl_Free() called through pointer of incorrect type check-in2023-10-13 14:33:24
chrstphrchvzwiki2023-10-17 09:53:47
This was fixed in [e75f319dc8cf]. Thanks, Jan!
Log in (anonymous is fine) to add a comment.
Attachments:
- 52dbc4b3f8ef.diff [download] added by chrstphrchvz on 2023-10-13 08:42:38. [details]