Commit 98bc3f6
committed
Add backend unit tests for rej_uniform and poly compress/decompress
Add native-vs-C consistency tests for previously untested backends:
- mlk_rej_uniform_native: compare against mlk_rej_uniform_c
- mlk_poly_compress_d{4,5,10,11}_native: compare against C reference
- mlk_poly_decompress_d{4,5,10,11}_native: compare against C reference
These tests call the assembly backends directly with heap-allocated
buffers, enabling valgrind to detect buffer overflows. In particular,
the rej_uniform test would have caught the 4-byte overread in the
AVX2 rejection sampling fixed in commit f10b801.
Previous ad-hoc tests for detecting overflow in (de)compression
routines are now subsumed by the unit tests, and removed.
Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>1 parent 2cea6f1 commit 98bc3f6
1 file changed
Lines changed: 239 additions & 142 deletions
0 commit comments