Re: [PATCH] analyzer PR 106003

2022-07-14 Thread David Malcolm via Gcc
On Thu, 2022-06-23 at 19:20 -0400, David Malcolm wrote: > On Fri, 2022-06-24 at 00:00 +0530, Mir Immad wrote: [...snip...] > > + > > +enum access_mode > > +fd_state_machine::get_access_mode_from_flag (int flag) const > > +{ > > +  /* FIXME: this code assumes the access modes on the host and > > +

Re: [PATCH] analyzer PR 106003

2022-06-27 Thread David Malcolm via Gcc
Thanks for the updated patch. Various notes below; mostly nits, but I realized there's a logic error in fd_state_machine::on_condition that I hadn't spotted before... [...snip...] > diff --git a/gcc/analyzer/ChangeLog b/gcc/analyzer/ChangeLog > index 53b3ffb487b..d30e94f2f62 100644 > --- a/gcc/a

Re: [PATCH] analyzer PR 106003

2022-06-27 Thread Mir Immad via Gcc
Thanks for the suggestions, Dave. +} > + else > +{ > + /* FIXME: add leak reporting */ > +} > +} > + > Please add a testcase for this, with an "xfail" in the dg-warning > directive. I fixed it and made other suggested changes. All the tests (for fds) are passing. Sending an up

Re: [PATCH] analyzer PR 106003

2022-06-26 Thread David Malcolm via Gcc
Thanks for the updated patch. Various comments inline below. Sorry if this seems nitpicky in places. I think the patch is nearly ready; please write a ChangeLog entry for the next one (none of my proposed changes are going to affect what the ChangeLog will look like, apart from new test case fil

Re: [PATCH] analyzer PR 106003

2022-06-23 Thread David Malcolm via Gcc
On Fri, 2022-06-24 at 00:00 +0530, Mir Immad wrote: Thanks for the updated patch. This is close to being ready. One big issue is the target hook idea for isolating the target's definition of the O_* flags as per Joseph's suggestion here: https://gcc.gnu.org/pipermail/gcc/2022-June/238961.html