Some more GCC10 -fanalyzer inspired patches

Mark Wielaard mark@klomp.org
Sun May 10 19:53:33 GMT 2020


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.

Cheers,

Mark


More information about the Elfutils-devel mailing list