Tcl Source Code

Ticket Change Details
Login
Overview

Artifact ID: e484bd5aa0568df54e9def993fd1622e65448e1e
Ticket: f7654f59c6b62b0fb451f8a22bbd16c7b9c9dd66
crc::sum returns incorrect checksum on 1K data, Win 7 64-bit.
User & Date: anonymous 2014-03-17 19:46:34
Changes

  1. assignee changed to: "nobody"
  2. closer changed to: "nobody"
  3. cmimetype changed to: "text/plain"
  4. comment changed to:
    Using a 1024 byte input string, the resulting checksum is incorrect.  I suspect the problem has to do with the sum exceeding 16 bits, and the return statement from ::crc::SumSysV is using a "%" operator rather than "&" to mask the output.
    
    Command being used:
      set ckSum [crc::sum -sysv -- $data]
    
      where data is a 1024 byte string.
    
    The correct checksum is returned if the data string is 128 bytes.
    
  5. foundin changed to: "SUM 1.1.0"
  6. is_private changed to: "0"
  7. login: "anonymous"
  8. priority changed to: "5 Medium"
  9. private_contact changed to: "2e7fb03fb66ed06254678661359741d8fe23ed8b"
  10. resolution changed to: "None"
  11. severity changed to: "Critical"
  12. status changed to: "Open"
  13. submitter changed to: "anonymous"
  14. subsystem changed to: "- New Builtin Commands"
  15. title changed to:
    crc::sum returns incorrect checksum on 1K data, Win 7 64-bit.
    
  16. type changed to: "Bug"