diff options
author | Sam James <sam@gentoo.org> | 2022-10-28 00:37:43 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-10-28 00:37:43 +0100 |
commit | de8d2c8de7d456a15f83551bfc3fcf6ff1fffaf1 (patch) | |
tree | a06757927c818a18336c1bb3783160197636700b /bin | |
parent | install-qa-check.d/90gcc-warnings: add -Wbuiltin-declaration-mismatch (diff) | |
download | portage-de8d2c8de7d456a15f83551bfc3fcf6ff1fffaf1.tar.gz portage-de8d2c8de7d456a15f83551bfc3fcf6ff1fffaf1.tar.bz2 portage-de8d2c8de7d456a15f83551bfc3fcf6ff1fffaf1.zip |
install-qa-check.d/90gcc-warnings: add -Wmismatched-dealloc
These could easily lead to UAFs / out of bound access if the
malloc used is oversized (e.g. using my_free() on something
allocated by malloc(), with my_free() assuming existence
of some extra data from my_malloc()).
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'bin')
-rw-r--r-- | bin/install-qa-check.d/90gcc-warnings | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/install-qa-check.d/90gcc-warnings b/bin/install-qa-check.d/90gcc-warnings index 256e6918b..3a57c0a3b 100644 --- a/bin/install-qa-check.d/90gcc-warnings +++ b/bin/install-qa-check.d/90gcc-warnings @@ -66,6 +66,9 @@ gcc_warn_check() { 'warning: .*\[-Waggressive-loop-optimizations\]' # conversion between pointers that have incompatible types 'warning: .*\[-Wincompatible-pointer-types\]' + # using wrong deallocator, e.g. using free() on object allocated using my_malloc() + # when my_malloc() is annotated as needing my_free(). + 'warning: .*\[-Wmismatched-dealloc\]' # clobbered: Warn for variables that might be changed by longjmp or vfork # (This warning is also enabled by -Wextra.) 'warning: .*\[-Wclobbered\]' |