test: add tests for zero sized realloc(3)
C23 declared calling realloc(3) with a non-NULL pointer and zero size Undefined behavior.
Check that hardened_malloc handles that case sanely by free'ing the old pointer and returning a special pointer, like malloc(3) called with size zero.
This will break real world applications and isn't actually memory corruption, resulting in reduced security from not being able to use those applications from hardened_malloc.
The safest way to handle this is the way it already does: treating it the same way as malloc(0) by resizing to a 0 size allocation, which with hardened_malloc points to PROT_NONE memory with a unique address meeting the minimum alignment requirements for malloc despite it having a usable size of 0.
Dropped the change in behavior, and added some additional test cases.
Kindly ping