[Boost-bugs] [Boost C++ Libraries] #7098: CRC: Initial values should not be reflected

Subject: [Boost-bugs] [Boost C++ Libraries] #7098: CRC: Initial values should not be reflected
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2012-07-06 10:58:48


#7098: CRC: Initial values should not be reflected
--------------------------------------------------+-------------------------
 Reporter: Dave Vasilevsky <dave@…> | Owner: dlwalker
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: crc
  Version: Boost Development Trunk | Severity: Problem
 Keywords: |
--------------------------------------------------+-------------------------
 The CRC classes have a parameter 'ReflectIn', which affects whether the
 message data is reflected. It also causes the initial remainder of the CRC
 to be reflected, and that's probably incorrect. This has likely remained
 undetected 'til now because all the included presets use bit-palindromic
 initial remainders.

 LVM2 uses a non-palindromic initial remainder, so I've used its code for a
 test case. You can see that both LVM's calc_crc() and zlib's crc32() don't
 reflect the initial remainder. It's evident that boost's crc does, and
 that no obvious change in template parameters yields the same behaviour as
 LVM and zlib.

 Tested in both clang++ 3.1 and g++ 4.2.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/7098>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:10 UTC