vppinfra: bihash_vec8_8 set key in mark_free 77/42377/1
authorMatus Fabian <[email protected]>
Wed, 19 Feb 2025 20:44:36 +0000 (15:44 -0500)
committerMatus Fabian <[email protected]>
Wed, 19 Feb 2025 20:58:37 +0000 (15:58 -0500)
When key not set to ~0 clib_bihash_key_compare_vec8_8 do not skip empty
slot during search and we crash.

Type: fix

Change-Id: I48f510bceffcfb5e4851dd757cad055a6f7f12d0
Signed-off-by: Matus Fabian <[email protected]>
src/vppinfra/bihash_vec8_8.h

index 822f1bc..1532103 100644 (file)
@@ -46,6 +46,7 @@ static inline void
 clib_bihash_mark_free_vec8_8 (clib_bihash_kv_vec8_8_t *v)
 {
   v->value = 0xFEEDFACE8BADF00DULL;
+  v->key = ~0ULL;
 }
 
 /** Decide if a clib_bihash_kv_vec8_8_t instance is free