searcher: nil pointer panic presence
Created by: slimsag
in Sourcegraph 3.6 users are reporting nil pointer panics. The source of these appears to be here (in the 3.6 branch) in (*readerGrep).Find
:
In the above, rg.re
can be nil
, according to the docstring:
That is called by (*readerGrep).FindZip
:
Which is called by concurrentFind
:
Which appears to perform no checks about when rg.re
is nil
, except in a fast-path case:
I don't know under what circumstances we should be checking for rg.re == nil
but it is clear we're missing one here.