SonarCloud: Error occurred while analyzing compilation unit

Encountered an sonar-scanner error in my private github actions-based C++20 pipeline:

      - name: Install sonar-scanner
        uses: SonarSource/sonarcloud-github-c-cpp@v1


      - name: Run sonar-scanner
        id: sonar
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
        run: |

Has been working fine so far. Relevant bits from CI log:

  • SonarScanner
  • Java 11.0.17 Eclipse Adoptium (64-bit)
  • Linux 5.15.0-1041-azure amd64
  • Analyzing on SonarQube server
  • CFamily plugin version:
ERROR: Exception in thread pool-5-thread-2
com.sonar.cpp.analyzer.Analyzer$AnalyzerException: Exit code 139: /home/runner/work/miri-m-libmiri/miri-m-libmiri/src/serialization/binary/AnalogValue.cpp
	at com.sonar.cpp.analyzer.AnalysisHandler.acceptResult(
	at com.sonar.cpp.analyzer.Subprocess.execute(
	at com.sonar.cpp.plugin.CFamilySensor.lambda$process$40(
	at com.sonar.cpp.analyzer.AnalysisExecutor.lambda$submit$0(
	at java.base/java.util.concurrent.Executors$ Source)
	at java.base/ Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
	at java.base/java.util.concurrent.ThreadPoolExecutor$ Source)
	at java.base/ Source)

I have the reproducer file ready in case it is relevant.

For now, I can workaround by explicitly ignoring this particular file, but I would want to not have to do that everytime sonar breaks.

Hi @aunsbjerg,

I will send you a PM to upload the reproducer privately.


Hello @aunsbjerg and welcome to the community!

Thank you for taking the time to report the problem and share the reproducer. I have identified the cause of the issue and created CPP-4599 to track work on it.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.