Commit 2f538e7
Fix UBSAN run for hashtable unittest (#2126)
The unit test declared an array of size 1 and used pointers to elements
outside the array. This is fine because the pointers are never
dereferenced, but undefined-sanitizer complains.
Now, instead allocate a huge array to make sure all pointers into it are
valid.
Example failure:
https://github.com/valkey-io/valkey/actions/runs/15175084203/job/42673713108#step:10:123
Signed-off-by: Viktor Söderqvist <[email protected]>
Signed-off-by: Harkrishn Patro <[email protected]>1 parent 35c0138 commit 2f538e7
1 file changed
+2
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
902 | 902 | | |
903 | 903 | | |
904 | 904 | | |
905 | | - | |
906 | | - | |
907 | | - | |
| 905 | + | |
908 | 906 | | |
909 | 907 | | |
910 | 908 | | |
| |||
942 | 940 | | |
943 | 941 | | |
944 | 942 | | |
| 943 | + | |
945 | 944 | | |
946 | 945 | | |
947 | 946 | | |
| |||
0 commit comments