Re: [cocci] Searching for duplicate exception handling code with SmPL?
Julia Lawall <[email protected]> Sun, 21 Jun 2026 10:24:18 +0200 (CEST)
| Newsgroups | fr.inria.cocci |
|---|---|
| Message-ID | <[email protected]> |
On Sun, 21 Jun 2026, Markus Elfring wrote:
> >> The last kfree() call is counted here despite of the implementation detail
> >> that it is actually not explicitly specified within a known if branch.
> >>
> >> How would you determine the incidence distribution for discussed if branches
> >> from all Linux source files then?
> > As now mentioned numerous times, you have to prevent the ... from matching
> > a goto.
>
> Does this suggestion indicate a known data processing conflict for which we would be
> looking for a better solution than a code exclusion?
No. Its a nice and indtended feature of Coccinelle that if branch
patterns drift over gotos. Because often you want to know what is
reachable from the if branch, not exactly what is between the {}. If you
want something different, you have to specify that.
julia