Skip to content
Tcl Source Code History Of Ticket 57bfcf43dd
Login

History Of Ticket 57bfcf43dd

Artifacts Associated With Ticket 57bfcf43dd

  1. Ticket change [27b91fb5a2] (rid 209664) by chrstphrchvz on 2023-03-05 18:55:22:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/x-fossil-wiki"
    4. comment initialized to:
      In <tt>Tcl_SetWideIntObj()</tt> (generic/tclObj.c):
      
      <pre>
          if ((wideValue &gt;= (Tcl_WideInt) LONG_MIN)
      	    &amp;&amp; (wideValue &lt;= (Tcl_WideInt) LONG_MAX)) {
      	TclSetLongObj(objPtr, (long) wideValue);
          } else {
      #ifndef TCL_WIDE_INT_IS_LONG
      	TclSetWideIntObj(objPtr, wideValue);
      <span style="color:firebrick">#else
      	mp_int big;<br />
      	TclBNInitBignumFromWideInt(&amp;big, wideValue);
      	Tcl_SetBignumObj(objPtr, &amp;big);</span>
      #endif
          }
      </pre>
      
      The section creating a bignum is only defined when <tt>Tcl_WideInt</tt> is <tt>long</tt>. But when <tt>Tcl_WideInt</tt> is <tt>long</tt>, the range check is always true: <tt>TclSetLongObj()</tt> is always called, and the bignum section is never used.
      
      I am not aware of any other similar examples of this in core Tcl.
      
    5. foundin initialized to: "8.5.19, 8.6.13"
    6. is_private initialized to: "0"
    7. login: "chrstphrchvz"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "6133eb3026f9b10aa9b7b48da92ae2834fc225b0"
    10. resolution initialized to: "None"
    11. severity initialized to: "Minor"
    12. status initialized to: "Open"
    13. submitter initialized to: "chrstphrchvz"
    14. subsystem initialized to: "10. Objects"
    15. title initialized to: "Remove unreachable code in Tcl_SetWideIntObj()"
    16. type initialized to: "Patch"
  2. Ticket change [d62d8b5218] (rid 209785) by jan.nijtmans on 2023-03-06 21:22:08:

    1. assignee changed to: "jan.nijtmans"
    2. closedate changed to: "2460010.39037355"
    3. closer changed to: "jan.nijtmans"
    4. icomment: "Fixed [1045bf69c59070c|here]"
    5. login: "jan.nijtmans"
    6. mimetype: "text/x-fossil-wiki"
    7. resolution changed to: "Fixed"
    8. status changed to: "Closed"
  3. Ticket change [7eca1b7801] (rid 209786) by jan.nijtmans on 2023-03-06 21:23:40:

    1. closedate changed to: "2460010.39144106"
    2. icomment: "Fixed [71045bf69c59070c|here]"
    3. login: "jan.nijtmans"
    4. mimetype: "text/x-fossil-wiki"