Code Review
/
vpp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
review
|
tree
raw
|
patch
| inline |
side by side
(parent:
7391156
)
svm: reset vector data instead of length
69/22769/2
author
Benoît Ganne
<
[email protected]
>
Wed, 16 Oct 2019 12:58:51 +0000
(14:58 +0200)
committer
Florin Coras
<
[email protected]
>
Wed, 16 Oct 2019 15:28:17 +0000
(15:28 +0000)
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 <
[email protected]
>
src/plugins/unittest/svm_fifo_test.c
patch
|
blob
|
history
diff --git
a/src/plugins/unittest/svm_fifo_test.c
b/src/plugins/unittest/svm_fifo_test.c
index
6f8873d
..
a715fa2
100644
(file)
--- 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))