Repository navigation
Commit 73e04a5
committed
fix: skip SCIP generation of occurrences with empty locations
Sorbet can assign empty locations to synthesized AST nodes, including
Minitest `before` hooks inside `test_each`. Passing these locations to
`trimColonColonPrefix` triggers an assertion in debug builds and can
segfault in release builds as we've seen in production.
Skip definitions and references with empty locations before converting
them to SCIP ranges, and add a regression test for the Minitest case.
Signed-off-by: Emi <emi@sourcegraph.com>1 parent 1d2972b commit 73e04a5
1 file changed
Lines changed: 14 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
| |||
291 | 296 | | |
292 | 297 | | |
293 | 298 | | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
294 | 302 | | |
295 | 303 | | |
296 | 304 | | |
| |||
328 | 336 | | |
329 | 337 | | |
330 | 338 | | |
331 | | - | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
332 | 344 | | |
333 | 345 | | |
334 | 346 | | |
| |||
0 commit comments