On Thu, Oct 17, 2024 at 11:59 AM Mark Wielaard <m...@klomp.org> wrote: > > elf_compress would compress all (new) data chunks, but didn't reset > the section data_list. This would cause extra data to be returned > after decompression or create bad compressed data. Add a new testcase > for this and explicitly zap the scn->data_list before resetting the > elf section raw data after (de)compression. > > * libelf/elf_compress.c (__libelf_reset_rawdata): Cleanup > scn->data_list. > * tests/newzdata.c: New testcase. > * tests/Makefile.am (check_PROGRAMS): Add newzdata. > (TESTS): Likewise. > (newzdata_LDADD): New variable. > > https://sourceware.org/bugzilla/show_bug.cgi?id=32102 > > Signed-off-by: Mark Wielaard <m...@klomp.org>
LGTM. The new testcases pass on the trybots. And when I revert the elf_compress.c changes and run the new tests they fail as expected, so the elf_compress.c changes do in fact fix PR32102. Aaron