Skip to content
Tcl Source Code History Of Ticket fba9c1fc12
Login

History Of Ticket fba9c1fc12

Artifacts Associated With Ticket fba9c1fc12

  1. Ticket change [724048be43] (rid 196945) by chrstphrchvz on 2021-12-29 00:27:19:

    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 parseExpr-1.1:
      
      <pre>
      <span style="font-weight:bold">tcl/generic/tclTest.c:3623:46: <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/tclTest.c generic/tclTest.c
      index 5774dfc16..203c2ca4b 100644
      --- generic/tclTest.c
      +++ generic/tclTest.c
      @@ -3596,7 +3596,9 @@ PrintParse(
       		Tcl_NewIntObj(tokenPtr->numComponents));
           }
           Tcl_ListObjAppendElement(NULL, objPtr,
      <span style="color:red">-	    Tcl_NewStringObj(parsePtr->commandStart + parsePtr->commandSize,</span>
      <span style="color:green">+	    Tcl_NewStringObj(parsePtr->commandStart
      +		    ? parsePtr->commandStart + parsePtr->commandSize
      +		    : NULL,</span>
       	    -1));
       }
      <span> </span>
      </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: "34. tcltest Package"
    14. title initialized to: "pointer arithmetic using NULL in PrintParse()"
    15. type initialized to: "Patch"
  2. Ticket change [b9df89d053] (rid 197028) by jan.nijtmans on 2022-01-12 21:40:39:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2459592.40323853"
    3. closer changed to: "jan.nijtmans"
    4. icomment:
      Fixed [ac6ce2e3cf279f02|here]. Thanks for the report!
      
    5. login: "jan.nijtmans"
    6. mimetype: "text/plain"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"