Attention is currently required from: Nico Huber, Anastasia Klimchuk. Hello build bot (Jenkins), Nico Huber, Edward O'Callaghan, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/56323
to look at the new patch set (#2).
Change subject: tests: Wrap strdup to help cmocka recognise memory allocation ......................................................................
tests: Wrap strdup to help cmocka recognise memory allocation
This is a known issue in cmocka (see https://github.com/clibs/cmocka/issues/17) where cmocka does not recognise memory allocation happening inside strdup, and then later throws an error when the memory is freed. If the issue is fixed at some point, this workaround can be removed.
Given that cmocka already overrides malloc, calloc, realloc, free, adding strdup there seems fine.
Existing tests now can (and have to) free the memory they allocated by strdup, and this is in the same patch.
BUG=b:193584590 TEST=ninja test
Change-Id: I56aef6b342752d80995c36ab075b12198fc101d9 Signed-off-by: Anastasia Klimchuk aklm@chromium.org --- M tests/init_shutdown.c M tests/meson.build M tests/tests.c 3 files changed, 17 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/23/56323/2