On 2024-02-10 6:52 a.m., Iain Sandoe wrote:
On 10 Feb 2024, at 11:33, FX Coudert via Gcc <gcc@gcc.gnu.org> wrote:
I’m seeing the following analyzer test failures on darwin. They were introduced
in December, when the tests were moved around:
FAIL: c-c++-common/analyzer/fd-glibc-byte-stream-socket.c
FAIL: c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c
FAIL: c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c
FAIL: c-c++-common/analyzer/fd-symbolic-socket.c
They all have an unexpected analyzer warning, like this:
/Users/fx/gcc-upstream/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c:
In function 'int main()':
/Users/fx/gcc-upstream/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c:43:17:
warning: leak of file descriptor 'socket(2, 1, 0)' [CWE-775]
[-Wanalyzer-fd-leak]
/Users/fx/gcc-upstream/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c:43:17:
note: (1) socket created here
/Users/fx/gcc-upstream/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c:43:17:
note: (2) when 'socket' succeeds
/Users/fx/gcc-upstream/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c:43:17:
note: (3) 'socket(2, 1, 0)' leaks here
FAIL: c-c++-common/analyzer/fd-glibc-byte-stream-socket.c -std=c++98 (test for
excess errors)
I see they’ve been xfail'ed off on AIX and HPUX in previous patches, so I’m
wondering: are the tests glibc-specific? If so, should we mark them as suck? Or
are they real failures of the analyzer?
see also https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113150
Although I xfail'ed the tests on HPUX, I left the bug open.
Dave
--
John David Anglin dave.ang...@bell.net