diff options
author | Benoît Ganne <bganne@cisco.com> | 2019-10-16 14:58:51 +0200 |
---|---|---|
committer | Andrew Yourtchenko <ayourtch@gmail.com> | 2019-10-27 10:10:47 +0000 |
commit | de6453aa635bf466c9e38da8e8c0db1855ee9ddf (patch) | |
tree | 9275d07f63b6b521c3316be9122202798f556d68 /src | |
parent | 755f836d4dea09ea98f27f2328849d37e340a731 (diff) |
svm: reset vector data instead of length
Reseting vector length confuses ASAN and does not reset data either.
Only reset data instead.
Type: fix
Change-Id: Id60b8333df28a5b636a9d302b987bbad95c85c38
Signed-off-by: Benoît Ganne <bganne@cisco.com>
(cherry picked from commit a9f1e7d4fd764b4f68e830528dbd296921050293)
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/unittest/svm_fifo_test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/unittest/svm_fifo_test.c b/src/plugins/unittest/svm_fifo_test.c index 6f8873d7364..a715fa2a660 100644 --- a/src/plugins/unittest/svm_fifo_test.c +++ b/src/plugins/unittest/svm_fifo_test.c @@ -706,7 +706,6 @@ sfifo_test_fifo3 (vlib_main_t * vm, unformat_input_t * input) SFIFO_TEST (0, "[%d] peeked %u expected %u", j, data_buf[j], data_pattern[j]); } - vec_reset_length (data_buf); /* * Dequeue or drop all data @@ -717,6 +716,7 @@ sfifo_test_fifo3 (vlib_main_t * vm, unformat_input_t * input) } else { + memset (data_buf, 0, vec_len (data_pattern)); svm_fifo_dequeue (f, vec_len (data_pattern), data_buf); if (compare_data (data_buf, data_pattern, 0, vec_len (data_pattern), &j)) |