LLVM ERROR: Invalid size request on a scalable vector

We currently see the “LLVM ERROR: Invalid size request on a scalable vector” error which has been reported before.

SonarQube Server: Enterprise Edition v2026.5.3 (133540)

CFamily plugin 6.85.0.102562 (also happened with the 6.77 → 6.85 upgrade, first seen when C/C++ taint analysis became active)

Visual Studio 2026 (MSVC 14.51), x64, compile via build-wrapper. Affects about54 of ca. 741 translation units in a large project. The regular analysis completes, only taint IR generation fails for those TUs.

I tried to isolate the code/circumstances where this happens. What we could find:

- Trigger seems to be: Reading a non-enum field of a struct that has a member whose enum type is declared in the project’s precompiled header (stdafx.h, /Yu):

// in the PCH:  enum E { A, B };
struct S { E e; int i; };

int f(const S& s) { return s.i; }   // IR generation fails
// return static_cast(s.e);    // passes

This happens for plain, namespaced and enum class enums, any field order. It passes if the same enum is declared after the PCH, or if the TU is compiled without PCH. We could not reproduce it in a standalone project, nor with a separate PCH with identical content, nor with a PCH shared by more than 30 TUs. It seems to depend on how the analyzer handles one particular PCH in a large project.

Unfortunately I cannot share a reproducer here publicly. Maybe privately. Let me know.

I’ve just send you a PM.

Thanks for sharing your reproducer. I’ve verified your reproducer and your issue is the same as C/C++ taint analysis: LLVM IR generation fails with "Invalid size request on a scalable vector" (Win

We expect to have a fix in the next release of CFamily plugin.