Fix unit test failures with CFI sanitizer - made changes to function parameters to match their declaration. - verify test pass after changes. Change-Id: I84282cd2e37f06af78a0e8d65ac632c51a308ba0
diff --git a/av1/common/av1_rtcd_defs.pl b/av1/common/av1_rtcd_defs.pl index 7f2ae9e..a023eda 100644 --- a/av1/common/av1_rtcd_defs.pl +++ b/av1/common/av1_rtcd_defs.pl
@@ -291,7 +291,7 @@ specialize qw/av1_wedge_compute_delta_squares sse2 avx2/; # hash - add_proto qw/uint32_t av1_get_crc32c_value/, "void *crc_calculator, uint8_t *p, int length"; + add_proto qw/uint32_t av1_get_crc32c_value/, "void *crc_calculator, uint8_t *p, size_t length"; specialize qw/av1_get_crc32c_value sse4_2/; add_proto qw/void av1_compute_stats/, "int wiener_win, const uint8_t *dgd8, const uint8_t *src8, int h_start, int h_end, int v_start, int v_end, int dgd_stride, int src_stride, int64_t *M, int64_t *H";
diff --git a/av1/encoder/x86/highbd_block_error_intrin_avx2.c b/av1/encoder/x86/highbd_block_error_intrin_avx2.c index 719734c..ee3714d 100644 --- a/av1/encoder/x86/highbd_block_error_intrin_avx2.c +++ b/av1/encoder/x86/highbd_block_error_intrin_avx2.c
@@ -14,7 +14,8 @@ #include "aom/aom_integer.h" #include "av1/common/common.h" -int64_t av1_highbd_block_error_avx2(tran_low_t *coeff, tran_low_t *dqcoeff, +int64_t av1_highbd_block_error_avx2(const tran_low_t *coeff, + const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz, int bps) { int i;
diff --git a/test/hash_test.cc b/test/hash_test.cc index e9f7f63..1aed409 100644 --- a/test/hash_test.cc +++ b/test/hash_test.cc
@@ -24,7 +24,7 @@ namespace { typedef uint32_t (*get_crc32c_value_func)(void *calculator, uint8_t *p, - int length); + size_t length); typedef ::testing::tuple<get_crc32c_value_func, int> HashParam; @@ -45,7 +45,7 @@ CRC32C calc_; uint8_t *buffer_; int bsize_; - int length_; + size_t length_; }; AV1Crc32cHashTest::~AV1Crc32cHashTest() { ; } @@ -58,7 +58,7 @@ length_ = bsize_ * bsize_ * sizeof(uint16_t); buffer_ = new uint8_t[length_]; ASSERT_TRUE(buffer_ != NULL); - for (int i = 0; i < length_; ++i) { + for (size_t i = 0; i < length_; ++i) { buffer_[i] = rnd_.Rand8(); } }