aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2021-02-09 15:54:14 -0500
committerDavid Malcolm <dmalcolm@redhat.com>2021-02-09 15:54:14 -0500
commit790a8e8942b3f5a896ab5897cd209de1d9c382ae (patch)
tree457be320498768901e49e847bc14a3f21fe37d3a /gcc/fortran
parent1d9f3b7ad4f965a0acc21d42cb2d186ecd065b71 (diff)
downloadgcc-790a8e8942b3f5a896ab5897cd209de1d9c382ae.zip
gcc-790a8e8942b3f5a896ab5897cd209de1d9c382ae.tar.gz
gcc-790a8e8942b3f5a896ab5897cd209de1d9c382ae.tar.bz2
analyzer: support "_IO_"-prefixed variants of FILE * fns [PR98575]
PR analyzer/98575 describes an unexpected -Wanalyzer-malloc-leak false positive from gcc.dg/analyzer/pr94851-1.c on glibc < 2.28. The issue is that a getchar call gets inlined into a call to _IO_getc, and "_IO_getc" is not in the set of FILE * functions the analyzer "knows about". This exposes a bug in memory leak detection on code paths in which an unknown function has been called. The memory leak bug is fixed in the prior commit, but for good measure this patch special-cases the "_IO_"-prefixed names in glibc so that the analyzer can reuse its knowledge about the unprefixed variants. gcc/analyzer/ChangeLog: PR analyzer/98575 * sm-file.cc (is_file_using_fn_p): Support "_IO_"-prefixed variants. gcc/testsuite/ChangeLog: PR analyzer/98575 * gcc.dg/analyzer/file-1.c (test_5): New. * gcc.dg/analyzer/file-3.c: New test.
Diffstat (limited to 'gcc/fortran')
0 files changed, 0 insertions, 0 deletions