-
Notifications
You must be signed in to change notification settings - Fork 0
Troubleshooting
Checks:
which clang
which clang-20
echo "$CT_CLANG"Fix options:
- install matching LLVM/Clang version
- set
CT_CLANGto an existing clang binary - configure CMake with explicit
LLVM_DIRandClang_DIR
CMake verifies clang major version against LLVM major version. Use matching toolchain packages and avoid mixing system clang with LLVM package dirs.
resolveDriverConfig() may inspect .o/.a symbols to infer C++ mode.
If object inspection fails, you can force intent with explicit flags:
./build/cc --driver-mode=g++ foo.o bar.o
# or add explicit C++ stdlib flags
./build/cc foo.o bar.o -lstdc++--in-mem expects one compile job and no linker phase.
Use one input unit at a time.
This can happen when args do not produce compile jobs (for example, malformed link-only invocation). Re-check input files and compile/link flags.
When instrumentation runs in-process, supported frontend actions are object, LLVM IR, and bitcode emission. Avoid unsupported frontend-only modes for this path.
Check runtime disable flags:
env | rg '^CT_DISABLE_|^CT_EARLY_TRACE|^CT_SHADOW'CT_DISABLE_TRACE disables trace logs.
Confirm both layers:
- compile-time: built with
--ct-autofree - runtime: optional scanner vars (
CT_AUTOFREE_SCAN*) set as needed
Also note conservative scans can keep allocations alive when stale pointers remain in roots.
./build/cc --help
./build/cc -v main.c -o app
./build/cc --instrument -v main.c -o app_instThe -v flag is forwarded to clang and helps inspect include/lib resolution.
Start
Architecture
Instrumentation
Developer