public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug analyzer/106283] New: RFE: analyzer handling of close_range and closefrom
@ 2022-07-13 19:24 dmalcolm at gcc dot gnu.org
  0 siblings, 0 replies; only message in thread
From: dmalcolm at gcc dot gnu.org @ 2022-07-13 19:24 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 106283
           Summary: RFE: analyzer handling of close_range and closefrom
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: dmalcolm at gcc dot gnu.org
            Blocks: 106003
  Target Milestone: ---

As noted here:
  https://sourceware.org/pipermail/libc-alpha/2022-July/140623.html
and
  https://sourceware.org/pipermail/libc-alpha/2022-July/140624.html
other ways of closing a file-descriptor other than calling "close" are:

close_range:
  https://man7.org/linux/man-pages//man2/close_range.2.html

closefrom:
  https://man.openbsd.org/closefrom

To e.g. avoid false reports from -Wanalyzer-fd-leak we might as well add
special-case handling for these functions in sm-fd.cc

(consider cases where each endpoint is concrete vs symbolic, and where specific
FDs of interest are concrete vs symbolic)

Probably a low-priority RFE.


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106003
[Bug 106003] RFE: -fanalyzer could complain about misuse of file-descriptors

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-07-13 19:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-13 19:24 [Bug analyzer/106283] New: RFE: analyzer handling of close_range and closefrom dmalcolm at gcc dot gnu.org

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).