Skip to content
Tcl Source Code History Of Ticket 1557855fffffffffffffffffffffffffffffffff
Login

History Of Ticket 1557855fffffffffffffffffffffffffffffffff

Artifacts Associated With Ticket 1557855fffffffffffffffffffffffffffffffff

  1. Ticket change [ca6b0e16a5] (rid 95342) by ollystephens on 2006-09-13 12:11:06:

    1. assignee initialized to: "dkf"
    2. cmimetype initialized to: "text/plain"
    3. comment initialized to:
      If I do:
      
      fcopy $in $out -size 3221176172
      
      the channel copying code receives a negative size, with
      disastrous consequences.
      
      Seems like it will only except a 32-bit signed integer
      and does no error handling.
      
      With today's modern filesystems, definitely needs to be
      capable of handling larger numbers.
      
      
      I did a quick visual inspection of the 8.5 release and
      it looks the same.
      
      
      Olly
      
    4. foundin initialized to: "obsolete: 8.4.13"
    5. is_private initialized to: "0"
    6. priority initialized to: "5 Medium"
    7. resolution initialized to: "None"
    8. status initialized to: "Open"
    9. submitter initialized to: "ollystephens"
    10. subsystem initialized to: "16. Commands A-H"
    11. title initialized to: "fcopy doesn't handle large sizes"
    12. type initialized to: "Bug"
  2. Ticket change [fabb7cb884] (rid 91930) by dkf on 2006-09-13 19:47:57:

    1. assignee changed to: "andreas_kupries"
    2. priority changed to: "6"
    3. subsystem changed to: "24. Channel Commands"
  3. Ticket change [edbeeb6303] (rid 103947) by dgp on 2006-09-14 00:51:27:

    1. icomment:
      Logged In: YES 
      user_id=80530
      
      
      The internal routines that make
      up the guts of [fcopy] pass around
      "int" arguments to track the number
      of bytes left to copy.  All of
      them would need to change to correct
      this.  So long as they are all internal,
      that should be possible.
      
      
    2. login: "dgp"
    3. mimetype: "text/plain"
    4. username: "dgp"
  4. Ticket change [30f5c73479] (rid 93343) by ctasada on 2007-02-19 17:24:32:

    1. icomment:
      Logged In: YES 
      user_id=340696
      Originator: NO
      
      Any chance to have it fixed in 8.5?
      
      
    2. login: "ctasada"
    3. mimetype: "text/plain"
    4. username: "ctasada"
  5. Ticket change [a42aad0ce5] (rid 110166) by ferrieux on 2008-04-05 06:05:23:

    1. icomment:
      Logged In: YES 
      user_id=496139
      Originator: NO
      
      Half-fixed :-)
      (Truly fixing would imply switching to at least wide ints or even worse... which may hit the performance of the dominant use of -size with a small value (who would do a fcopy of 4G without a progress indicator ?))
      
      It is not true that there is no error handling: a value over 4G will elicit an "integer value too large to represent" error.
      However, there was still the signed-int vs. unsigned-int issue: a value of 3G is silently accepted as negative, *and* negative values were not rejected.
      
      The patch below (tclIOCmd.c) rejects negative values:
      
      case FcopySize:
          if (TclGetIntFromObj(interp, objv[i+1], &toRead) != TCL_OK) {
      return TCL_ERROR;
          }
      +    if (toRead<0) {
      +Tcl_AppendResult(interp, "negative size forbidden",NULL);
      +return TCL_ERROR;
      +    }
          break;
      
      
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  6. Ticket change [913b2f1226] (rid 120591) by ferrieux on 2008-04-09 16:51:41:

    1. icomment:
      Logged In: YES 
      user_id=496139
      Originator: NO
      
      Andreas, any comment ?
      
      
    2. login: "ferrieux"
    3. mimetype: "text/plain"
    4. username: "ferrieux"
  7. Ticket change [88c20fa5d0] (rid 131915) by andreas_kupries on 2008-04-10 00:54:28:

    1. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      Doing such a check is good. I do not like the returned message yet. It can happen for true negative sizes, and for overflow, and for the second case the message is not a good indicator what went wrong. I will play with that part of the fix to see if I can find a way to separate the 2 cases and return proper messages for each of them.
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  8. Ticket change [b904e4159f] (rid 129055) by andreas_kupries on 2008-04-10 01:37:43:

    1. closedate changed to: "2008-04-09T18:37:43"
    2. closer changed to: "andreas_kupries"
    3. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      Done, with modified check to separate overflow from true negatives.
      Committed to 8.4, 8.5 branch, and head.
      
      
      
    4. login: "andreas_kupries"
    5. mimetype: "text/plain"
    6. resolution changed to: "Fixed"
    7. status changed to: "Closed"
    8. username: "andreas_kupries"
  9. Ticket change [f27ce85859] (rid 109548) by andreas_kupries on 2008-04-11 03:14:33:

    1. icomment:
      Logged In: YES 
      user_id=75003
      Originator: NO
      
      Source diving revealed that '-size -1' is a special value which has meaning ('copy all'), which we should preserve.
      
      After additional discussion with JeffH and Don Porter we will keep the check for 'toRead < 0', however it will not be an error, but simply reset toRead to the default -1. That means that from then on all negative values, and values out of the range warapping to negative will behave as -1, copy everything.
      
      
      
    2. login: "andreas_kupries"
    3. mimetype: "text/plain"
    4. username: "andreas_kupries"
  10. Ticket change [fe9c3b682f] (rid 108620) by rkeene on 2012-03-05 05:08:38:

    1. icomment:
      Any chance this bug will actually get fixed ?
      
      
    2. login: "rkeene"
    3. mimetype: "text/plain"
    4. username: "rkeene"