source - scan-build results

User:pbuilder@deb-belz6f
Working Directory:/build/source
Command Line:/tmp/cmake/bin/cmake --build build-llvm -j 27 --target stage2
Clang Version:Debian clang version 19.0.0 (++20240412100848+03c393db1821-1~exp1~20240412220905.1331)
Date:Sat Apr 13 13:36:20 2024

Bug Summary

Bug TypeQuantityDisplay?
All Bugs23
API
Argument with 'nonnull' attribute passed null2
Logic error
Branch condition evaluates to a garbage value2
Dereference of null pointer6
Function call with invalid argument1
Memory error
Memory leak7
Unused code
Dead initialization5

Filter Results by File

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length Description
APIArgument with 'nonnull' attribute passed nullclang/tools/c-index-test/c-index-test.cperform_test_reparse_source221446Null pointer passed to 1st parameter expecting 'nonnull'View Report
APIArgument with 'nonnull' attribute passed nullclang/tools/c-index-test/c-index-test.cperform_test_reparse_source221947Null pointer passed to 1st parameter expecting 'nonnull'View Report
Logic errorBranch condition evaluates to a garbage valuebolt/runtime/common.hstrLen2094Branch condition evaluates to a garbage valueView Report
Logic errorBranch condition evaluates to a garbage valuebolt/runtime/instr.cppparseAddressRange66622Branch condition evaluates to a garbage valueView Report
Unused codeDead initializationclang/tools/c-index-test/c-index-test.cperform_token_annotation43421Value stored to 'kind' during its initialization is never readView Report
Unused codeDead initializationbolt/runtime/hugify.cppgetKernelVersion391Value stored to 'Ret' during its initialization is never readView Report
Unused codeDead initializationbolt/runtime/instr.cppcomputeEdgeFrequencies12481Value stored to 'Parent' during its initialization is never readView Report
Unused codeDead initializationbolt/runtime/instr.cppopenProfile14671Value stored to 'Ptr' during its initialization is never readView Report
Unused codeDead initializationbuild-llvm/tools/clang/stage2-bins/CMakeFiles/CMakeTmp/src.cmain21Value stored to 'p' during its initialization is never readView Report
Logic errorDereference of null pointerbolt/runtime/instr.cppcomputeEdgeFrequencies121832Array access (via field 'EdgeFreqs') results in a null pointer dereferenceView Report
Logic errorDereference of null pointerbolt/runtime/instr.cppcomputeEdgeFrequencies125550Array access (via field 'EdgeFreqs') results in a null pointer dereferenceView Report
Logic errorDereference of null pointerbolt/runtime/instr.cppcomputeEdgeFrequencies127052Array access (via field 'EdgeFreqs') results in a null pointer dereferenceView Report
Logic errorDereference of null pointerbolt/runtime/instr.cppvisitAllCallsIn109437Array access (from variable 'CallFreqs') results in a null pointer dereferenceView Report
Logic errorDereference of null pointerbolt/runtime/instr.cppvisitAllCallsIn109037Array access (from variable 'CallFreqs') results in a null pointer dereferenceView Report
Logic errorDereference of null pointerbolt/runtime/instr.cppwriteFunctionProfile133321Array access (via field 'EdgeFreqs') results in a null pointer dereferenceView Report
Logic errorFunction call with invalid argumentclang/tools/c-index-test/c-index-test.cparse_remapped_files_with_opt32552The 1st argument to 'fread' is a buffer with size 0 but should be a buffer with size equal to or greater than the value of the 2nd argument (which is 1) times the 3rd argument (which is 18446744073709551615)View Report
Memory errorMemory leakclang/tools/c-index-test/c-index-test.cfind_file_includes_in333136Potential leak of memory pointed to by 'Filenames'View Report
Memory errorMemory leakclang/tools/c-index-test/c-index-test.cfind_file_refs_at320429Potential leak of memory pointed to by 'Locations'View Report
Memory errorMemory leakclang/tools/c-index-test/c-index-test.cinspect_cursor_at291023Potential leak of memory pointed to by 'Locations'View Report
Memory errorMemory leakclang/tools/c-index-test/c-index-test.cparse_remapped_files_with_try38179Potential leak of memory pointed to by 'unsaved_files_no_try_idx'View Report
Memory errorMemory leakclang/tools/c-index-test/c-index-test.cperform_code_completion276937Potential leak of memory pointed to by 'filename'View Report
Memory errorMemory leakclang/tools/c-index-test/c-index-test.cperform_code_completion277347Potential leak of memory pointed to by 'unsaved_files'View Report
Memory errorMemory leakclang/tools/c-index-test/c-index-test.cperform_test_reparse_source220771Potential leak of memory pointed to by 'unsaved_files'View Report

Analyzer Failures

The analyzer had problems processing the following files:

ProblemSource FilePreprocessed FileSTDERR Output
Other Errorbuild-llvm/tools/clang/stage2-bins/CMakeFiles/CMakeTmp/src.cclang_other_error_NFUdGJ.iclang_other_error_NFUdGJ.i.stderr.txt
Other Errorbuild-llvm/tools/clang/stage2-bins/CMakeFiles/CMakeTmp/src.cclang_other_error_Q2wW4h.iclang_other_error_Q2wW4h.i.stderr.txt
Other Errorbuild-llvm/tools/clang/stage2-bins/CMakeFiles/CMakeTmp/src.cclang_other_error_ouKNGt.iclang_other_error_ouKNGt.i.stderr.txt
Other Errorbuild-llvm/tools/clang/stage2-bins/CMakeFiles/CMakeTmp/CheckIncludeFile.cclang_other_error_u9RoYe.iclang_other_error_u9RoYe.i.stderr.txt

Please consider submitting preprocessed files as bug reports.