diff options
author | Benoît Ganne <bganne@cisco.com> | 2019-10-16 14:58:51 +0200 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-10-16 15:28:17 +0000 |
commit | a9f1e7d4fd764b4f68e830528dbd296921050293 (patch) | |
tree | 8482d98933263c8ca74c723b30fb1df2544e4921 | |
parent | 7391156ce68a81f258d65f498ec6161d694fae47 (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>
-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)) |