https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109097

            Bug ID: 109097
           Summary: No SARIF output happens on an ICE
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: dmalcolm at gcc dot gnu.org
  Target Milestone: ---

If an ICE occurs inside cc1 with -fdiagnostics-format=sarif-file, then no
.sarif file is written out.

This is a nuisance e.g. for my integration testing of -fanalyzer, which I'm
gathering the results via the .sarif output; if it crashes on a particular
source file, then no output is generated, and it's effectively silent about the
crash.

I've been experimenting with adding SARIF output to the crash-handling code
(which I used to detect PR analyzer/109094); filing this bug to track this
work.

It's not clear how such crashes should be encoded in SARIF form; my prototype
emits them within the results array with with:
  ruleId": "internal compiler error"
but arguably as it's a failure of the analyzer rather than the
software-under-test such crashses should be captured as a SARIF 3.58
"notification" object.

Note to self: in one version of my prototypes there was an infinite loop where
a crash could happen in the crash-handling code, so need to be careful about
this.

Reply via email to