Artifacts Associated With Ticket 6cb3db4965
Ticket change [aea681282d] (rid 196944) by chrstphrchvz on 2021-12-28 23:51:25:
- assignee initialized to: "nobody"
- closer initialized to: "nobody"
- cmimetype initialized to: "text/x-fossil-wiki"
- comment initialized to:
[https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#available-checks|UBSan <tt>-fsanitize=pointer-overflow</tt>] error during test event-11.8: <pre> <span style="font-weight:bold">tcl/generic/tclProc.c:1431:30: <span style="color:red">runtime error:</span> applying zero offset to null pointer</span> </pre> Using a ternary expression avoids the error: <pre> diff --git generic/tclProc.c generic/tclProc.c index 642294cd8..1bd7361b1 100644 --- generic/tclProc.c +++ generic/tclProc.c @@ -1428,7 +1428,7 @@ InitArgsAndLocals( numArgs = procPtr->numArgs; argCt = framePtr->objc - skip; /* Set it to the number of args to the * procedure. */ <span style="color:red">- argObjs = framePtr->objv + skip;</span> <span style="color:green">+ argObjs = framePtr->objv ? framePtr->objv + skip : NULL;</span> if (numArgs == 0) { if (argCt) { goto incorrectArgs; </pre> - foundin initialized to: "8.6.12"
- is_private initialized to: "0"
- login: "chrstphrchvz"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- severity initialized to: "Minor"
- status initialized to: "Open"
- submitter initialized to: "chrstphrchvz"
- subsystem initialized to: "22. [proc] and [uplevel]"
- title initialized to:
pointer arithmetic using NULL in InitArgsAndLocals()
- type initialized to: "Patch"
Ticket change [3d632c8639] (rid 197044) by jan.nijtmans on 2022-01-13 11:49:48:
- assignee changed to: "jan.nijtmans"
- closedate changed to: "2459592.99291804"
- closer changed to: "jan.nijtmans"
- icomment:
Fixed [17a4e01dd3ae5ba0|here] (slightly different) . Thanks for the report!
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"
- resolution changed to: "Fixed"
- status changed to: "Closed"