public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "danglin at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug analyzer/113150] New: FAIL: c-c++-common/analyzer/fd-glibc-byte-stream-socket.c -std=c++98 (test for excess errors) Date: Tue, 26 Dec 2023 17:59:15 +0000 [thread overview] Message-ID: <bug-113150-4@http.gcc.gnu.org/bugzilla/> (raw) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113150 Bug ID: 113150 Summary: FAIL: c-c++-common/analyzer/fd-glibc-byte-stream-socket.c -std=c++98 (test for excess errors) Product: gcc Version: 14.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: analyzer Assignee: dmalcolm at gcc dot gnu.org Reporter: danglin at gcc dot gnu.org Target Milestone: --- Host: hppa64-hp-hpux11.11 Target: hppa64-hp-hpux11.11 Build: hppa64-hp-hpux11.11 Created attachment 56948 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56948&action=edit Preprocessed source spawn -ignore SIGHUP /home/dave/gnu/gcc/objdir64/gcc/testsuite/g++/../../xg++ -B /home/dave/gnu/gcc/objdir64/gcc/testsuite/g++/../../ /home/dave/gnu/gcc/gcc/gcc/ testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c -fdiagnostics-plai n-output -nostdinc++ -I/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include/hppa64-hp-hpux11.11 -I/home/dave/gnu/gcc/objdir64/hppa64-hp-hpux11.11/libstdc++-v3/include -I/home/dave/gnu/gcc/gcc/libstdc++-v3/libsupc++ -I/home/dave/gnu/gcc/gcc/libstdc++-v3/include/backward -I/home/dave/gnu/gcc/gcc/libstdc++-v3/testsuite/util -fmessage-length=0 -std=c++98 -fanalyzer -Wanalyzer-too-complex -fanalyzer-call-summaries -S -o fd-glibc-byte-stream-socket.s /home/dave/gnu/gcc/gcc/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c: In function 'int main()': /home/dave/gnu/gcc/gcc/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c:42:17: warning: leak of file descriptor 'socket(2, 1, 0)' [CWE-775] [-Wanalyzer-fd-leak] /home/dave/gnu/gcc/gcc/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c:42:17: note: (1) socket created here /home/dave/gnu/gcc/gcc/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c:42:17: note: (2) when 'socket' succeeds /home/dave/gnu/gcc/gcc/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c:42: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) Excess errors: /home/dave/gnu/gcc/gcc/gcc/testsuite/c-c++-common/analyzer/fd-glibc-byte-stream-socket.c:42:17: warning: leak of file descriptor 'socket(2, 1, 0)' [CWE-775] [-Wanalyzer-fd-leak] I tried modifying the test to close sock, but that didn't help. _exit() didn't work either. Similar g++ fails: FAIL: c-c++-common/analyzer/fd-glibc-byte-stream-socket.c -std=c++14 (test for excess errors) FAIL: c-c++-common/analyzer/fd-glibc-byte-stream-socket.c -std=c++17 (test for excess errors) FAIL: c-c++-common/analyzer/fd-glibc-byte-stream-socket.c -std=c++20 (test for excess errors) FAIL: c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c -std=c++98 (test for excess errors) FAIL: c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c -std=c++14 (test for excess errors) FAIL: c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c -std=c++17 (test for excess errors) FAIL: c-c++-common/analyzer/fd-manpage-getaddrinfo-client.c -std=c++20 (test for excess errors) FAIL: c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c -std=c++98 (test for excess errors) FAIL: c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c -std=c++14 (test for excess errors) FAIL: c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c -std=c++17 (test for excess errors) FAIL: c-c++-common/analyzer/fd-mappage-getaddrinfo-server.c -std=c++20 (test for excess errors) FAIL: c-c++-common/analyzer/fd-symbolic-socket.c -std=c++98 (test for excess errors) FAIL: c-c++-common/analyzer/fd-symbolic-socket.c -std=c++14 (test for excess errors) FAIL: c-c++-common/analyzer/fd-symbolic-socket.c -std=c++17 (test for excess errors) FAIL: c-c++-common/analyzer/fd-symbolic-socket.c -std=c++20 (test for excess errors)
next reply other threads:[~2023-12-26 17:59 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2023-12-26 17:59 danglin at gcc dot gnu.org [this message] 2024-01-14 18:24 ` [Bug analyzer/113150] " cvs-commit at gcc dot gnu.org 2024-01-18 19:51 ` iains at gcc dot gnu.org 2024-01-18 19:55 ` iains at gcc dot gnu.org 2024-03-04 13:05 ` [Bug analyzer/113150] [14 Regression] " rguenth at gcc dot gnu.org 2024-03-07 20:53 ` law at gcc dot gnu.org 2024-05-07 7:43 ` [Bug analyzer/113150] [14/15 " rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-113150-4@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).