On Fri, 2022-07-22 at 21:25 +0530, Immad Mir wrote:
> This patch adds three new function attributes to GCC that
> are used for static analysis of usage of file descriptors:
>
> 1) __attribute__ ((fd_arg(N))): The attributes may be applied to a
> function that
> takes an open file descriptor at ref
This patch adds three new function attributes to GCC that
are used for static analysis of usage of file descriptors:
1) __attribute__ ((fd_arg(N))): The attributes may be applied to a function that
takes an open file descriptor at refrenced argument N.
It indicates that the passed filedescriptor
> Sorry to nitpick -- I assume stmt here refers to a call stmt ?
> In that case, I suppose it'd be better to use const gcall *stmt ?
Thanks for the catch, Prathamesh.
Immad.
On Wed, Jul 20, 2022 at 11:59 PM Prathamesh Kulkarni <
prathamesh.kulka...@linaro.org> wrote:
> On Wed, 20 Jul 2022 at
On Wed, 20 Jul 2022 at 23:31, Immad Mir via Gcc-patches
wrote:
>
> This patch adds three new function attributes to GCC that
> are used for static analysis of usage of file descriptors:
>
> 1) __attribute__ ((fd_arg(N))): The attributes may be applied to a function
> that
> takes on open file des
On Wed, 2022-07-20 at 23:29 +0530, Immad Mir wrote:
> This patch adds three new function attributes to GCC that
> are used for static analysis of usage of file descriptors:
Thanks for the updated patch.
Some very minor spelling/grammar/whitespace nits...
>
> 1) __attribute__ ((fd_arg(N))): Th
This patch adds three new function attributes to GCC that
are used for static analysis of usage of file descriptors:
1) __attribute__ ((fd_arg(N))): The attributes may be applied to a function that
takes on open file descriptor at refrenced argument N.
It indicates that the passed filedescriptor
On Tue, 2022-07-19 at 14:18 -0400, David Malcolm wrote:
> On Tue, 2022-07-19 at 21:36 +0530, Immad Mir wrote:
>
[...snip...]
>
>
> > +void
> > +fd_state_machine::check_for_fd_attrs (
> > + sm_context *sm_ctxt, const supernode *node, const gimple
> > *stmt,
> > + const tree callee_fndecl,
On Tue, 2022-07-19 at 21:36 +0530, Immad Mir wrote:
[...snip...]
Thanks for the patch.
It's nearly ready for trunk; I have some review comments below, mostly
nits, but a couple of other issues...
> gcc/ChangeLog:
> * doc/extend.texi: Add fd_arg, fd_arg_read and fd_arg_write under
>
This patch adds three new function attributes to GCC that
are used for static analysis of usage of file descriptors:
1) __attribute__ ((fd_arg(N))): The attributes may be applied to a function that
takes on open file descriptor at refrenced argument N.
It indicates that the passed filedescriptor
On Fri, 2022-07-15 at 21:08 +0530, Immad Mir wrote:
Thanks for the patch.
Various review comments:
The patch is missing a ChangeLog.
> ---
> gcc/analyzer/sm-fd.cc| 257 ---
> gcc/c-family/c-attribs.cc| 115
> gcc/doc/extend.texi
---
gcc/analyzer/sm-fd.cc| 257 ---
gcc/c-family/c-attribs.cc| 115
gcc/doc/extend.texi | 19 ++
gcc/testsuite/gcc.dg/analyzer/fd-5.c | 53 ++
gcc/testsuite/gcc.dg/analyzer/fd-6.c | 14 ++
5 files changed, 431
11 matches
Mail list logo