On Thu, Mar 03, 2022 at 05:08:30PM -0700, Martin Sebor wrote:
> > 1) shouldn't it give up for EDGE_ABNORMAL too?  I mean, e.g.
> >     following a non-local goto forced edge from a noreturn call
> >     to a non-local label (if there is just one) doesn't seem
> >     right to me
> 
> Possibly yes.  I can add it but I don't have a lot of experience with
> these bits so if you can suggest a test case to exercise this that
> would be helpful.

Something like:
void
foo (void)
{
  __label__ l;
  __attribute__((noreturn)) void bar (int x) { if (x) goto l; __builtin_trap 
(); }
  bar (0);
l:;
}
shows a single EDGE_ABNORMAL from the bar call.
But it would need tweaking for the ptr use and clobber.

> > 2) if EDGE_DFS_BACK is computed and 1) is done, is there any
> >     reason why you need 2 levels of protection, i.e. the EDGE_DFS_BACK
> >     check as well as the visited bitmap (and having them use
> >     very different answers, if EDGE_DFS_BACK is seen, the function
> >     will return false, if visited bitmap has a bb, it will return true)?
> >     Can't the visited bitmap go away?
> 
> Possibly.  As I said above, I don't have enough experience with these
> bits to make (and test) the changes quickly, or enough bandwidth to
> come up to speed on them.  Please feel free to make these improvements.

I'll change that if it passes testing.

        Jakub

Reply via email to