The backend unit tests would currently not identify buffer overflows in the assembly. For this, we should switch to valgrind and allocate buffers from the heap rather than the stack.
Acceptance criteria:
This can piggy-back on the customization of MLK_ALLOC/MLK_FREE that was introduced in #1389. Specifically, one can consider simply building test_unit.c with the custom heap allocation config, and change the allocation in test_unit.c to use MLK_ALLOC/MLK_FREE as in the main source files mlkem/src/{indcpa.c/kem.c}.
The backend unit tests would currently not identify buffer overflows in the assembly. For this, we should switch to valgrind and allocate buffers from the heap rather than the stack.
Acceptance criteria:
This can piggy-back on the customization of
MLK_ALLOC/MLK_FREEthat was introduced in #1389. Specifically, one can consider simply buildingtest_unit.cwith the custom heap allocation config, and change the allocation intest_unit.cto useMLK_ALLOC/MLK_FREEas in the main source filesmlkem/src/{indcpa.c/kem.c}.