> check for double "close" of a FD (CWE-1341).
> check for read/write of a closed file descriptor
These sound good but kinda non general or incomplete to me.
I mean, isn't the "right" thing, to disallow passing
a closed fd to "almost any" function?
But I realize "almost any" is diffic
Snapshot gcc-12-20220702 is now available on
https://gcc.gnu.org/pub/gcc/snapshots/12-20220702/
and on various mirrors, see http://gcc.gnu.org/mirrors.html for details.
This snapshot has been generated from the GCC 12 git branch
with the following options: git://gcc.gnu.org/git/gcc.git branch
On Sat, 2022-07-02 at 19:34 +0530, Mir Immad wrote:
> From 62b7b7736975172f03b30783436fbc9217324223 Mon Sep 17 00:00:00 2001
> From: mir
> Date: Sat, 2 Jul 2022 15:04:37 +0530
> Subject: [PATCH] analyzer: implement five new warnings for misuse of
> POSIX
> file descriptor APIs [PR106003].
>
> Th
Hi everyone,
This is a patch for PR 106003
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106003; tested on x86_64.
On Sat, Jul 2, 2022 at 7:34 PM Mir Immad wrote:
> From 62b7b7736975172f03b30783436fbc9217324223 Mon Sep 17 00:00:00 2001
> From: mir
> Date: Sat, 2 Jul 2022 15:04:37 +0530
> Subjec
>From 62b7b7736975172f03b30783436fbc9217324223 Mon Sep 17 00:00:00 2001
From: mir
Date: Sat, 2 Jul 2022 15:04:37 +0530
Subject: [PATCH] analyzer: implement five new warnings for misuse of POSIX
file descriptor APIs [PR106003].
This patch adds a new state machine to the analyzer for checking usag