Skip to content
Tcl Source Code History Of Ticket 6cb3db4965
Login

History Of Ticket 6cb3db4965

Artifacts Associated With Ticket 6cb3db4965

  1. Ticket change [aea681282d] (rid 196944) by chrstphrchvz on 2021-12-28 23:51:25:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. 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>
      
    5. foundin initialized to: "8.6.12"
    6. is_private initialized to: "0"
    7. login: "chrstphrchvz"
    8. priority initialized to: "5 Medium"
    9. resolution initialized to: "None"
    10. severity initialized to: "Minor"
    11. status initialized to: "Open"
    12. submitter initialized to: "chrstphrchvz"
    13. subsystem initialized to: "22. [proc] and [uplevel]"
    14. title initialized to:
      pointer arithmetic using NULL in InitArgsAndLocals()
      
    15. type initialized to: "Patch"
  2. Ticket change [3d632c8639] (rid 197044) by jan.nijtmans on 2022-01-13 11:49:48:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459592.99291804"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Fixed [17a4e01dd3ae5ba0|here] (slightly different) . Thanks for the report!
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"