]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
common/crc32c_intel_fast: avoid reading partial trailing word
authorSage Weil <sage@inktank.com>
Thu, 5 Sep 2013 04:29:11 +0000 (21:29 -0700)
committerSage Weil <sage@inktank.com>
Fri, 6 Sep 2013 16:31:59 +0000 (09:31 -0700)
commit39c89dcfed0587f822e2226f2de8e4092449af29
tree73494e0c7e7ff75d64c6a1db46561dd297ba1e26
parentbb980c854513f2cca0d180eb2b0dd1cf26d47cf3
common/crc32c_intel_fast: avoid reading partial trailing word

The optimized intel code reads in word-sized chunks, knowing that the
allocator will only hand out memory in word-sized increments.   This makes
valgrind unhappy.  Whitelisting doesn't work because for some reason there
is no caller context (probably because of some interaction with yasm?).

Instead, just use the baseline code for the last few bytes.  This should
not be significant.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
src/common/crc32c_intel_fast.c
src/test/common/test_crc32c.cc