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

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-04-10
            Summary|apparent -Wanalyzer-fd-leak |[13/14 Regression]
                   | false positive             |-Wanalyzer-fd-leak false
                   |                            |positive writing to int *
                   |                            |param
     Ever confirmed|0                           |1

--- Comment #1 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for filing this bug.

Confirmed (thanks for the godbolt link).

Affects GCC 13 onwards (which added that warning)

Looks like for some reason the analyzer isn't treating (*sock) as keeping the
value of the fd alive.

Reply via email to