public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ro at CeBiTec dot Uni-Bielefeld.DE" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug analyzer/107750] Many gcc.dg/analyzer/fd-*.c tests FAIL
Date: Fri, 18 Nov 2022 13:39:45 +0000	[thread overview]
Message-ID: <bug-107750-4-KqEFpV8wOz@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-107750-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107750

--- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #2 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
> Sorry about the breakage; thanks for filing this, and for the patch.
>
> Looking at:
>   FAIL: gcc.dg/analyzer/fd-access-mode-target-headers.c  (test for warnings,
> line 53)
> it looks like the analyzer was able to figure out the values of O_RDONLY and
> O_WRONLY in your headers, but not of O_ACCMODE.  I suspect it might be having
> issues with SOCK_STREAM and SOCK_DGRAM also.
>
> How are these values defined in your headers?  The analyzer has gained some
> ability to try to e.g. scrape macro values from the C frontend, but only some
> cases are supported.

<sys/fcntl.h>:

#define O_ACCMODE       (O_SEARCH | O_EXEC | 0x3)

<sys/socket.h>:          

#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
#define SOCK_STREAM     NC_TPI_COTS     /* stream socket */
#define SOCK_DGRAM      NC_TPI_CLTS     /* datagram socket */
#define SOCK_RAW        NC_TPI_RAW      /* raw-protocol interface */
#else
#define SOCK_STREAM     2               /* stream socket */
#define SOCK_DGRAM      1               /* datagram socket */
#define SOCK_RAW        4               /* raw-protocol interface */
#endif  /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */

NC_TPI_COTS is also 2, same for the other two.

> There's a way of debugging this using -fdump-analyzer, but I'm looking at
> adding a way to make such issues show up more clearly in the DejaGnu logs,
> which hopefully should make them easier to track down.

That would certainly be nice.

Thanks.
        Rainer

  parent reply	other threads:[~2022-11-18 13:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-18 12:30 [Bug analyzer/107750] New: " ro at gcc dot gnu.org
2022-11-18 12:31 ` [Bug analyzer/107750] " ro at gcc dot gnu.org
2022-11-18 12:31 ` ro at gcc dot gnu.org
2022-11-18 13:29 ` dmalcolm at gcc dot gnu.org
2022-11-18 13:39 ` ro at CeBiTec dot Uni-Bielefeld.DE [this message]
2023-04-26  6:57 ` rguenth at gcc dot gnu.org
2023-07-27  9:24 ` rguenth at gcc dot gnu.org
2024-05-08 12:07 ` [Bug analyzer/107750] [13/14/15 Regression] " ro at gcc dot gnu.org
2024-05-13 14:57 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-05-14  9:12 ` ro at CeBiTec dot Uni-Bielefeld.DE
2024-05-14 14:23 ` cvs-commit at gcc dot gnu.org
2024-05-21  9:12 ` jakub at gcc dot gnu.org
2024-06-04  7:04 ` cvs-commit 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-107750-4-KqEFpV8wOz@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: link
Be 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).