Re: analyzer: implement five new warnings for misuse of POSIX

2022-07-02 Thread Jay K via Gcc
 > 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

gcc-12-20220702 is now available

2022-07-02 Thread GCC Administrator via Gcc
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

Re: [PATCH] PR 106003

2022-07-02 Thread David Malcolm via Gcc
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

Re: [PATCH] PR 106003

2022-07-02 Thread Mir Immad via Gcc
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

[PATCH] PR 106003

2022-07-02 Thread Mir Immad via Gcc
>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