Author: Hrutvik Kanabar <hru...@google.com
Date: 2022-09-30 (Fri, 30 Sep 2022)
pkg/report: improve guilty file identification
Previously we would pick the first non-ignored file. Now instead,
continue searching the stack trace for more specific files.
A "more specific" file wrt the first non-ignored file has:
- the same directory prefix
- a deeper directory nesting
E.g. `fs/ntfs3/*.c` is "more specific" than "fs/*.c".
We search for the most specific file (i.e. the deepest nesting), and
take the first most specific if there are multiple files with the same
This commit also adds three tests for this behaviour, taken from
recent `syzbot` bugs which identified the wrong file. Now the desired
file is identified.
Only one existing test shows different output with the new behaviour.