Uploaded image for project: 'SonarCFamily'
  1. SonarCFamily
  2. CPP-3261

Fix crash when using Preamble and target triple is unknown

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 6.24
    • Fix Version/s: 6.26
    • Component/s: None
    • Labels:
      None

      Description

      This is currently triggered by (mainly) the following use case:

      • SonarLint CLion with remote toolchain and analysis of a single file (preamble is built only when a single file is analyzed)
      • target triple defaults to x86_64-unknown-unknown in case of remote toolchains
      • preamble is built with x86_64-unknown-unknown target info
      • analysis runs with a custom target info not matching the target info used during preamble build
      • inconsistency of target info leads to a crash when a builtin is present in x86_64-unknown-unknown and used in the analyzed compilation unit. The builtin will be present in the Preamble but not found during analysis in the custom target info CPP-3159, that leads to inconsistency, and crash.

      Example of a builtin to reproduce the issue: __builtin_ia32_pand

      We should use the same target info during Preamble construction as the one used during analysis.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              evgeny.mandrikov Evgeny Mandrikov
              Reporter:
              massimo.paladin Massimo PALADIN
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: