Skip to content

Commit

Permalink
test/hash: fix out of bound access
Browse files Browse the repository at this point in the history
rwc_non_lf_results->multi_rw, rwc_lf_results->multi_rw, and
rwc_perf_results->multi_rw are accessed at indexes
[0..NUM_TEST-1][0..1][0..NUMTEST-1]. Currently the first index
overflows the array size in struct rwc_perf.

Fixes: c7eb097 ("test/hash: add lock-free r/w concurrency")
Cc: stable@dpdk.org

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
  • Loading branch information
xypron authored and tmonjalo committed Jun 26, 2022
1 parent 96c3a92 commit 8343fd7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/test/test_hash_readwrite_lf_perf.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ struct rwc_perf {
uint32_t w_ks_r_hit_nsp[2][NUM_TEST];
uint32_t w_ks_r_hit_sp[2][NUM_TEST];
uint32_t w_ks_r_miss[2][NUM_TEST];
uint32_t multi_rw[NUM_TEST - 1][2][NUM_TEST];
uint32_t multi_rw[NUM_TEST][2][NUM_TEST];
uint32_t w_ks_r_hit_extbkt[2][NUM_TEST];
uint32_t writer_add_del[NUM_TEST];
};
Expand Down

0 comments on commit 8343fd7

Please sign in to comment.