Error: CPPCHECK_WARNING (CWE-562): [#def1] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/basic_block.cpp:280: error[returnDanglingLifetime]: Returning pointer to local variable 'new_block_temp' that will be invalid when returning. # 278| } # 279| # 280|-> return new_block; # 281| } # 282| Error: CPPCHECK_WARNING (CWE-562): [#def2] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/constants.h:602: error[danglingLifetime]: Non-local variable 'const_pool_' will use object that points to local variable 'cst'. # 600| // in the pool. Otherwise, it returns |cst|. # 601| const Constant* RegisterConstant(std::unique_ptr<Constant> cst) { # 602|-> auto ret = const_pool_.insert(cst.get()); # 603| if (ret.second) { # 604| owned_constants_.emplace_back(std::move(cst)); Error: CPPCHECK_WARNING (CWE-476): [#def3] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/folding_rules.cpp:1797: warning[nullPointer]: Possible null pointer dereference: first_element_inst # 1795| Instruction* original_inst = def_use_mgr->GetDef(original_id); # 1796| uint32_t original_type_id = # 1797|-> GetElementType(original_inst->type_id(), first_element_inst->begin() + 3, # 1798| first_element_inst->end() - 1, def_use_mgr); # 1799| Error: CPPCHECK_WARNING (CWE-476): [#def4] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/folding_rules.cpp:1798: warning[nullPointer]: Possible null pointer dereference: first_element_inst # 1796| uint32_t original_type_id = # 1797| GetElementType(original_inst->type_id(), first_element_inst->begin() + 3, # 1798|-> first_element_inst->end() - 1, def_use_mgr); # 1799| # 1800| if (inst->type_id() != original_type_id) { Error: CPPCHECK_WARNING (CWE-562): [#def5] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/interface_var_sroa.cpp:484: error[returnDanglingLifetime]: Returning pointer to local variable 'new_access_chain' that will be invalid when returning. # 482| def_use_mgr->AnalyzeInstDefUse(inst); # 483| insert_before->InsertBefore(std::move(new_access_chain)); # 484|-> return inst; # 485| } # 486| Error: CPPCHECK_WARNING (CWE-562): [#def6] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/interface_var_sroa.cpp:502: error[returnDanglingLifetime]: Returning pointer to local variable 'new_access_chain' that will be invalid when returning. # 500| context()->get_def_use_mgr()->AnalyzeInstDefUse(inst); # 501| insert_before->InsertBefore(std::move(new_access_chain)); # 502|-> return inst; # 503| } # 504| Error: CPPCHECK_WARNING (CWE-562): [#def7] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/interface_var_sroa.cpp:652: error[returnDanglingLifetime]: Returning pointer to local variable 'load' that will be invalid when returning. # 650| context()->get_def_use_mgr()->AnalyzeInstDefUse(load_inst); # 651| insert_before->InsertBefore(std::move(load)); # 652|-> return load_inst; # 653| } # 654| Error: CPPCHECK_WARNING (CWE-562): [#def8] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/loop_peeling.cpp:392: error[returnDanglingLifetime]: Returning pointer to local variable 'new_bb' that will be invalid when returning. # 390| BasicBlock* ret = new_bb.get(); # 391| loop_utils_.GetFunction()->AddBasicBlock(std::move(new_bb), it); # 392|-> return ret; # 393| } # 394| Error: CPPCHECK_WARNING (CWE-562): [#def9] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/scalar_analysis.cpp:372: error[returnDanglingLifetime]: Returning pointer to local variable 'prospective_node' that will be invalid when returning. # 370| SENode* raw_ptr_to_node = prospective_node.get(); # 371| node_cache_.insert(std::move(prospective_node)); # 372|-> return raw_ptr_to_node; # 373| } # 374| Error: CPPCHECK_WARNING (CWE-562): [#def10] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/ssa_rewrite_pass.cpp:569: error[invalidLifetime]: Using object that points to local variable 'phi_inst' that is out of scope. # 567| // registration of the Phi instruction itself to avoid trying to analyze # 568| // uses of Phi instructions that have not been registered yet. # 569|-> for (Instruction* phi_inst : generated_phis) { # 570| pass_->get_def_use_mgr()->AnalyzeInstUse(&*phi_inst); # 571| } Error: CPPCHECK_WARNING (CWE-476): [#def11] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/wrap_opkill.cpp:128: error[nullPointer]: Null pointer dereference: killing_func # 126| : &opterminateinvocation_function_; # 127| # 128|-> if (*killing_func != nullptr) { # 129| return (*killing_func)->result_id(); # 130| } Error: CPPCHECK_WARNING (CWE-476): [#def12] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/wrap_opkill.cpp:129: error[nullPointer]: Null pointer dereference: killing_func # 127| # 128| if (*killing_func != nullptr) { # 129|-> return (*killing_func)->result_id(); # 130| } # 131| Error: CPPCHECK_WARNING (CWE-476): [#def13] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/wrap_opkill.cpp:147: error[nullPointer]: Null pointer dereference: killing_func # 145| func_start->AddOperand({SPV_OPERAND_TYPE_FUNCTION_CONTROL, {0}}); # 146| func_start->AddOperand({SPV_OPERAND_TYPE_ID, {GetVoidFunctionTypeId()}}); # 147|-> (*killing_func).reset(new Function(std::move(func_start))); # 148| # 149| // Generate the function end instruction Error: CPPCHECK_WARNING (CWE-476): [#def14] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/wrap_opkill.cpp:152: error[nullPointer]: Null pointer dereference: killing_func # 150| std::unique_ptr<Instruction> func_end( # 151| new Instruction(context(), spv::Op::OpFunctionEnd, 0, 0, {})); # 152|-> (*killing_func)->SetFunctionEnd(std::move(func_end)); # 153| # 154| // Create the one basic block for the function. Error: CPPCHECK_WARNING (CWE-476): [#def15] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/wrap_opkill.cpp:169: error[nullPointer]: Null pointer dereference: killing_func # 167| # 168| // Add the bb to the function # 169|-> (*killing_func)->AddBasicBlock(std::move(bb)); # 170| # 171| // Add the function to the module. Error: CPPCHECK_WARNING (CWE-476): [#def16] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/wrap_opkill.cpp:173: error[nullPointer]: Null pointer dereference: killing_func # 171| // Add the function to the module. # 172| if (context()->AreAnalysesValid(IRContext::kAnalysisDefUse)) { # 173|-> (*killing_func)->ForEachInst([this](Instruction* inst) { # 174| context()->AnalyzeDefUse(inst); # 175| }); Error: CPPCHECK_WARNING (CWE-476): [#def17] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/wrap_opkill.cpp:179: error[nullPointer]: Null pointer dereference: killing_func # 177| # 178| if (context()->AreAnalysesValid(IRContext::kAnalysisInstrToBlockMapping)) { # 179|-> for (BasicBlock& basic_block : *(*killing_func)) { # 180| context()->set_instr_block(basic_block.GetLabelInst(), &basic_block); # 181| for (Instruction& inst : basic_block) { Error: CPPCHECK_WARNING (CWE-476): [#def18] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/opt/wrap_opkill.cpp:187: error[nullPointer]: Null pointer dereference: killing_func # 185| } # 186| # 187|-> return (*killing_func)->result_id(); # 188| } # 189| Error: COMPILER_WARNING: [#def19] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/text.cpp: scope_hint: In function ‘spvTextToBinaryInternal’ spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/source/text.cpp:801:42: warning[-Walloc-size-larger-than=]: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 # 801 | uint32_t* data = new uint32_t[totalSize]; # | ^ /usr/include/c++/14/new:133:26: note: in a call to allocation function ‘operator new []’ declared here # 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) # | ^ # 799| } # 800| # 801|-> uint32_t* data = new uint32_t[totalSize]; # 802| if (!data) return SPV_ERROR_OUT_OF_MEMORY; # 803| uint64_t currentIndex = SPV_INDEX_INSTRUCTION; Error: COMPILER_WARNING: [#def20] spirv-tools-2024.3-build/SPIRV-Tools-vulkan-sdk-1.3.296.0/tools/opt/opt.cpp:659:55: warning[-Walloc-size-larger-than=]: argument 1 value ‘18446744073709551615’ exceeds maximum object size 9223372036854775807 # 659 | const char** new_argv = new const char*[flags.size()]; # | ^ /usr/include/c++/14/new: scope_hint: In function ‘ParseFlags’ /usr/include/c++/14/new:133:26: note: in a call to allocation function ‘operator new []’ declared here # 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) # | ^ # 657| flags.insert(flags.end(), file_flags.begin(), file_flags.end()); # 658| # 659|-> const char** new_argv = new const char*[flags.size()]; # 660| for (size_t i = 0; i < flags.size(); i++) { # 661| if (flags[i].find("-Oconfig=") != std::string::npos) {
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-200.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | spirv-tools-2024.3-4.fc42 |
store-results-to | /tmp/tmpm3ky_us9/spirv-tools-2024.3-4.fc42.tar.xz |
time-created | 2024-11-13 03:21:12 |
time-finished | 2024-11-13 03:27:40 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpm3ky_us9/spirv-tools-2024.3-4.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpm3ky_us9/spirv-tools-2024.3-4.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |