Some more GCC10 -fanalyzer inspired patches

Mark Wielaard mark@klomp.org
Thu May 14 12:44:19 GMT 2020


On Sun, 2020-05-10 at 21:53 +0200, Mark Wielaard wrote:
> I did another build with the final GCC10 and -fanalyzer. The
> -Wanalyzer-use-of-uninitialized-value option was removed, which caused
> a lot of false positives. Without those it was easier to identify some
> real issues. I also tried -fanalyze together with -flto. This takes a
> lot of memory (linking libdw.so uses > 12GB) but does allow -fanalyzer
> to detect some cross-function issues.
> 
> [PATCH 1/7] libdwfl: Cleanup user_core resources on failure in
> [PATCH 2/7] tests: Make sure to not call memcmp with NULL arguments.
> [PATCH 3/7] libelf: Check __gelf_getehdr_rdlock call doesn't fail in
> [PATCH 4/7] libelf: Check for NULL shdr in elf_strptr.
> [PATCH 5/7] src: Check ebl_openbackend result before using ebl
> [PATCH 6/7] libdwfl: Return failure from dwfl_standard_find_debuginfo
> [PATCH 7/7] libcpu: Free unused new bitfield on error in i386_parse.y
> 
> I think they all are for real issues, although probably fairly hard
> to trigger. All are somewhat trivial and I intent to check them in soon.

I pushed all 7 patches to elfutils git master.


More information about the Elfutils-devel mailing list