diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 73321a8..a3dc137 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 name: Build on: diff --git a/.github/workflows/clang-format.yml b/.github/workflows/clang-format.yml index 16a1aae..b888cb9 100644 --- a/.github/workflows/clang-format.yml +++ b/.github/workflows/clang-format.yml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 name: clang-format on: diff --git a/.github/workflows/commit-check.yml b/.github/workflows/commit-check.yml index 5d75c9a..964d468 100644 --- a/.github/workflows/commit-check.yml +++ b/.github/workflows/commit-check.yml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 name: Commit conventions on: diff --git a/.github/workflows/license-compliance.yml b/.github/workflows/license-compliance.yml new file mode 100644 index 0000000..34041a0 --- /dev/null +++ b/.github/workflows/license-compliance.yml @@ -0,0 +1,17 @@ +# SPDX-License-Identifier: Apache-2.0 +name: license-compliance + +on: + push: + branches: [main, master] + pull_request: + +jobs: + license-compliance: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Verify Apache-2.0 license compliance + run: bash ./scripts/check-license-compliance.sh diff --git a/.github/workflows/publish-docker.yml b/.github/workflows/publish-docker.yml index 2089492..357f445 100644 --- a/.github/workflows/publish-docker.yml +++ b/.github/workflows/publish-docker.yml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 name: Publish Docker Images on: diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index 5a17b08..dc91975 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 name: Build Release Binaries on: diff --git a/.github/workflows/test-ci-integration.yml b/.github/workflows/test-ci-integration.yml index bcf7e9e..7531fe9 100644 --- a/.github/workflows/test-ci-integration.yml +++ b/.github/workflows/test-ci-integration.yml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 name: Test CI Integration on: diff --git a/.gitignore b/.gitignore index d352530..fa8a84e 100644 --- a/.gitignore +++ b/.gitignore @@ -33,3 +33,8 @@ # Build directories /build/ + +# Python cache and temporary files +__pycache__/ +*.py[cod] +*.tmp diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bad34cd..2352ffa 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 repos: - repo: local hooks: diff --git a/CMakeLists.txt b/CMakeLists.txt index a607d7e..58d7938 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 cmake_minimum_required(VERSION 3.21) project(stack_usage_analyzer) diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/NOTICE b/NOTICE new file mode 100644 index 0000000..14c096a --- /dev/null +++ b/NOTICE @@ -0,0 +1,8 @@ +coretrace-concurrency-analyzer +Copyright 2026 Hugo Payet + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 diff --git a/action.yml b/action.yml index 559dfa6..9955746 100644 --- a/action.yml +++ b/action.yml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 name: "CoreTrace Stack Analyzer" description: "Static stack usage analysis for C/C++ code — detects stack overflows, VLAs, recursion, and more." author: "CoreTrace" diff --git a/build.sh b/build.sh index a90af4f..55681ae 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/cmake/CheckLLVMVersion.cmake b/cmake/CheckLLVMVersion.cmake index 91a64a1..0da0832 100644 --- a/cmake/CheckLLVMVersion.cmake +++ b/cmake/CheckLLVMVersion.cmake @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 # cmake/CheckLLVMVersion.cmake function(check_llvm_version MIN_REQUIRED) message(STATUS "Checking for LLVM >= ${MIN_REQUIRED}...") diff --git a/cmake/compiler/coretrace-compiler.cmake b/cmake/compiler/coretrace-compiler.cmake index 17a80fc..b1ac58c 100644 --- a/cmake/compiler/coretrace-compiler.cmake +++ b/cmake/compiler/coretrace-compiler.cmake @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 include(FetchContent) # Optional ASAN enablement at the top-level to match the cc dependency. diff --git a/cmake/logger/coretraceLog.cmake b/cmake/logger/coretraceLog.cmake index eb115cd..394807e 100644 --- a/cmake/logger/coretraceLog.cmake +++ b/cmake/logger/coretraceLog.cmake @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 set(CORETRACE_LOGGER_BUILD_EXAMPLES OFF CACHE BOOL "Disable logger examples" OFF) set(CORETRACE_LOGGER_BUILD_TESTS OFF CACHE BOOL "Disable logger tests" OFF) diff --git a/docs/ci/github-actions-consumer.yml b/docs/ci/github-actions-consumer.yml index b63b6ff..85e2cfe 100644 --- a/docs/ci/github-actions-consumer.yml +++ b/docs/ci/github-actions-consumer.yml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 name: CoreTrace Stack Analyzer on: diff --git a/docs/ci/github-actions-docker-consumer.yml b/docs/ci/github-actions-docker-consumer.yml index e22955b..b3bd1a1 100644 --- a/docs/ci/github-actions-docker-consumer.yml +++ b/docs/ci/github-actions-docker-consumer.yml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 name: CoreTrace Stack Analyzer (Docker) on: diff --git a/docs/ci/github-actions-module-consumer.yml b/docs/ci/github-actions-module-consumer.yml index ecd3151..f377041 100644 --- a/docs/ci/github-actions-module-consumer.yml +++ b/docs/ci/github-actions-module-consumer.yml @@ -1,3 +1,4 @@ +# SPDX-License-Identifier: Apache-2.0 name: CoreTrace Stack Analyzer (Action Module) on: diff --git a/docs/issues/llvm-function-callsite-attributes-introspection.md b/docs/issues/llvm-function-callsite-attributes-introspection.md new file mode 100644 index 0000000..6114e6d --- /dev/null +++ b/docs/issues/llvm-function-callsite-attributes-introspection.md @@ -0,0 +1,68 @@ +# Add LLVM Function/Call-Site Attribute Introspection for Failure Semantics + +## Description +We need a first-class way to inspect LLVM IR attributes attached to functions and call sites in order to support failure-oriented checks (e.g., may-unwind, allocation behavior, return contracts). + +Current analysis can read IR and diagnostics, but there is no explicit user-facing feature to dump and audit attribute-level semantics per symbol/call site. + +## Goal +Add a dedicated analyzer feature to export attribute information per function and per `call`/`invoke` so users can understand which failure channels are inferable from IR and which require external models. + +## Why this matters +- Failure checks depend on reliable low-level signals (`nounwind`, EH shape, allocator attributes, return pointer contracts). +- `[[nodiscard]]` and similar frontend-only contracts are not consistently represented in LLVM IR; users need clear visibility into what is and is not available in IR. +- A deterministic dump reduces ambiguity when designing generic rules (no hardcoded API assumptions). + +## Proposed architecture +1. Add an `AttributeIntrospection` component under analyzer modules (read-only utility service). +2. Integrate it in pipeline orchestration as an optional stage (enabled by CLI/config flag). +3. Collect: + - function attributes (`Function::getAttributes().getFnAttrs()`) + - return/param attributes relevant to failure semantics + - call-site attributes from `llvm::CallBase` (`call` and `invoke`) + - EH structural hints (`invoke` unwind edge, personality presence, landing pad family) +4. Emit output in deterministic machine-readable form (JSON first; optional human section). +5. Keep behavior generic: + - no hardcoded list of STL or libc symbol names + - unknown attributes preserved as raw key/value when possible + +## CLI/config surface (proposal) +- `--dump-attrs` enable attribute introspection output +- `--dump-attrs-out=` write JSON artifact (default: stderr in human mode) +- optional filters (reuse existing filters): + - `--only-function` + - `--only-file` / `--only-dir` + +## Data contract (minimal) +Per function: +- `functionName`, `demangledName?`, `sourcePath?` +- `fnAttributes[]` +- `returnAttributes[]` +- `paramAttributes[{index, attrs[]}]` +- `hasPersonality`, `personalityName?` + +Per call site: +- `caller`, `location?` +- `kind` (`call` | `invoke`) +- `directCallee?` +- `callSiteAttributes[]` +- `hasUnwindEdge` (for invoke) + +## Non-goals +- No semantic verdict yet ("unchecked failure" rule is a separate issue). +- No hardcoded mapping from symbol name to "must check" policy in this issue. +- No test file edits without explicit authorization. + +## Acceptance criteria +- New option(s) produce deterministic output for a module with mixed `call`/`invoke`. +- Output includes function-level and call-site-level attributes. +- Unknown/string attributes are preserved (not silently dropped). +- Works for LLVM IR inputs and source-compiled inputs. +- Documentation explains IR visibility limits (e.g., frontend-only attributes). + +## Risks / tradeoffs +- Attribute sets vary by toolchain/version/optimization level; output must avoid over-promising semantic certainty. +- Excessive verbosity on large modules; output should be filterable and optionally file-based. + +## Follow-up +- Build `UncheckedFailure` diagnostics using this introspection plus external API models. diff --git a/extern-project/src/main.cpp b/extern-project/src/main.cpp index d922a7e..20a7657 100644 --- a/extern-project/src/main.cpp +++ b/extern-project/src/main.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "StackUsageAnalyzer.hpp" #include "cli/ArgParser.hpp" #include diff --git a/fixtures/ci-consumer-project/src/main.c b/fixtures/ci-consumer-project/src/main.c index 4096514..f1cfbdc 100644 --- a/fixtures/ci-consumer-project/src/main.c +++ b/fixtures/ci-consumer-project/src/main.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int main(void) { char buf[4]; diff --git a/include/StackUsageAnalyzer.hpp b/include/StackUsageAnalyzer.hpp index a2393d3..0f9886e 100644 --- a/include/StackUsageAnalyzer.hpp +++ b/include/StackUsageAnalyzer.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // StackUsageAnalyzer.hpp #pragma once diff --git a/include/analysis/AllocaUsage.hpp b/include/analysis/AllocaUsage.hpp index e03cc9d..de7f8c4 100644 --- a/include/analysis/AllocaUsage.hpp +++ b/include/analysis/AllocaUsage.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/AnalyzerUtils.hpp b/include/analysis/AnalyzerUtils.hpp index 99fe3e5..736f86a 100644 --- a/include/analysis/AnalyzerUtils.hpp +++ b/include/analysis/AnalyzerUtils.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/BufferWriteModel.hpp b/include/analysis/BufferWriteModel.hpp index f09765b..9232825 100644 --- a/include/analysis/BufferWriteModel.hpp +++ b/include/analysis/BufferWriteModel.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/CommandInjectionAnalysis.hpp b/include/analysis/CommandInjectionAnalysis.hpp index a8fa829..0d6b6ee 100644 --- a/include/analysis/CommandInjectionAnalysis.hpp +++ b/include/analysis/CommandInjectionAnalysis.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/CompileCommands.hpp b/include/analysis/CompileCommands.hpp index fd20660..d5a9367 100644 --- a/include/analysis/CompileCommands.hpp +++ b/include/analysis/CompileCommands.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/ConstParamAnalysis.hpp b/include/analysis/ConstParamAnalysis.hpp index cc407c8..e6f5a21 100644 --- a/include/analysis/ConstParamAnalysis.hpp +++ b/include/analysis/ConstParamAnalysis.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/DuplicateIfCondition.hpp b/include/analysis/DuplicateIfCondition.hpp index a833d7d..c9fe945 100644 --- a/include/analysis/DuplicateIfCondition.hpp +++ b/include/analysis/DuplicateIfCondition.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/DynamicAlloca.hpp b/include/analysis/DynamicAlloca.hpp index b6d4c01..f46824d 100644 --- a/include/analysis/DynamicAlloca.hpp +++ b/include/analysis/DynamicAlloca.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/FrontendDiagnostics.hpp b/include/analysis/FrontendDiagnostics.hpp index 8577741..de365e0 100644 --- a/include/analysis/FrontendDiagnostics.hpp +++ b/include/analysis/FrontendDiagnostics.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "StackUsageAnalyzer.hpp" diff --git a/include/analysis/FunctionFilter.hpp b/include/analysis/FunctionFilter.hpp index 538c4f3..0756a13 100644 --- a/include/analysis/FunctionFilter.hpp +++ b/include/analysis/FunctionFilter.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/GlobalReadBeforeWriteAnalysis.hpp b/include/analysis/GlobalReadBeforeWriteAnalysis.hpp index 565f653..bdb8a65 100644 --- a/include/analysis/GlobalReadBeforeWriteAnalysis.hpp +++ b/include/analysis/GlobalReadBeforeWriteAnalysis.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/IRValueUtils.hpp b/include/analysis/IRValueUtils.hpp index 723560f..31df867 100644 --- a/include/analysis/IRValueUtils.hpp +++ b/include/analysis/IRValueUtils.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/InputPipeline.hpp b/include/analysis/InputPipeline.hpp index e017453..f641e6a 100644 --- a/include/analysis/InputPipeline.hpp +++ b/include/analysis/InputPipeline.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/IntRanges.hpp b/include/analysis/IntRanges.hpp index bf323db..1d3d959 100644 --- a/include/analysis/IntRanges.hpp +++ b/include/analysis/IntRanges.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/IntegerOverflowAnalysis.hpp b/include/analysis/IntegerOverflowAnalysis.hpp index a962df6..2a537fb 100644 --- a/include/analysis/IntegerOverflowAnalysis.hpp +++ b/include/analysis/IntegerOverflowAnalysis.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/InvalidBaseReconstruction.hpp b/include/analysis/InvalidBaseReconstruction.hpp index a1da47d..9eeec4b 100644 --- a/include/analysis/InvalidBaseReconstruction.hpp +++ b/include/analysis/InvalidBaseReconstruction.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/MemIntrinsicOverflow.hpp b/include/analysis/MemIntrinsicOverflow.hpp index a0a3d9c..60322fb 100644 --- a/include/analysis/MemIntrinsicOverflow.hpp +++ b/include/analysis/MemIntrinsicOverflow.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/NullDerefAnalysis.hpp b/include/analysis/NullDerefAnalysis.hpp index a5a1738..de244be 100644 --- a/include/analysis/NullDerefAnalysis.hpp +++ b/include/analysis/NullDerefAnalysis.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/OOBReadAnalysis.hpp b/include/analysis/OOBReadAnalysis.hpp index 8b96dde..c33caa3 100644 --- a/include/analysis/OOBReadAnalysis.hpp +++ b/include/analysis/OOBReadAnalysis.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/ParameterDebugBinding.hpp b/include/analysis/ParameterDebugBinding.hpp index e5dd0e9..00be33d 100644 --- a/include/analysis/ParameterDebugBinding.hpp +++ b/include/analysis/ParameterDebugBinding.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/Reachability.hpp b/include/analysis/Reachability.hpp index 6e273b5..654bd38 100644 --- a/include/analysis/Reachability.hpp +++ b/include/analysis/Reachability.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "analysis/StackBufferAnalysis.hpp" diff --git a/include/analysis/ResourceLifetimeAnalysis.hpp b/include/analysis/ResourceLifetimeAnalysis.hpp index dc3c141..9ba4237 100644 --- a/include/analysis/ResourceLifetimeAnalysis.hpp +++ b/include/analysis/ResourceLifetimeAnalysis.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/SizeMinusKWrites.hpp b/include/analysis/SizeMinusKWrites.hpp index 0eaa258..6e0a284 100644 --- a/include/analysis/SizeMinusKWrites.hpp +++ b/include/analysis/SizeMinusKWrites.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/StackBufferAnalysis.hpp b/include/analysis/StackBufferAnalysis.hpp index 82bda06..af1062d 100644 --- a/include/analysis/StackBufferAnalysis.hpp +++ b/include/analysis/StackBufferAnalysis.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/StackComputation.hpp b/include/analysis/StackComputation.hpp index a132167..c556cd3 100644 --- a/include/analysis/StackComputation.hpp +++ b/include/analysis/StackComputation.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/StackPointerEscape.hpp b/include/analysis/StackPointerEscape.hpp index f37e72a..200e5b5 100644 --- a/include/analysis/StackPointerEscape.hpp +++ b/include/analysis/StackPointerEscape.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/TOCTOUAnalysis.hpp b/include/analysis/TOCTOUAnalysis.hpp index 6195390..dcc0098 100644 --- a/include/analysis/TOCTOUAnalysis.hpp +++ b/include/analysis/TOCTOUAnalysis.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/TypeConfusionAnalysis.hpp b/include/analysis/TypeConfusionAnalysis.hpp index dfed60d..f00d299 100644 --- a/include/analysis/TypeConfusionAnalysis.hpp +++ b/include/analysis/TypeConfusionAnalysis.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/UninitializedVarAnalysis.hpp b/include/analysis/UninitializedVarAnalysis.hpp index 3c382b4..f9d56dc 100644 --- a/include/analysis/UninitializedVarAnalysis.hpp +++ b/include/analysis/UninitializedVarAnalysis.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/smt/ConstraintIR.hpp b/include/analysis/smt/ConstraintIR.hpp index 3af9218..98cb76f 100644 --- a/include/analysis/smt/ConstraintIR.hpp +++ b/include/analysis/smt/ConstraintIR.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/smt/ISmtBackend.hpp b/include/analysis/smt/ISmtBackend.hpp index fce010f..57ae237 100644 --- a/include/analysis/smt/ISmtBackend.hpp +++ b/include/analysis/smt/ISmtBackend.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "analysis/smt/SolverTypes.hpp" diff --git a/include/analysis/smt/ISolverStrategy.hpp b/include/analysis/smt/ISolverStrategy.hpp index d883a1c..72d555f 100644 --- a/include/analysis/smt/ISolverStrategy.hpp +++ b/include/analysis/smt/ISolverStrategy.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "analysis/smt/ISmtBackend.hpp" diff --git a/include/analysis/smt/SmtEncoding.hpp b/include/analysis/smt/SmtEncoding.hpp index c318cd4..b0cabc8 100644 --- a/include/analysis/smt/SmtEncoding.hpp +++ b/include/analysis/smt/SmtEncoding.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "analysis/IntRanges.hpp" diff --git a/include/analysis/smt/SmtRefinement.hpp b/include/analysis/smt/SmtRefinement.hpp index 780c934..955d257 100644 --- a/include/analysis/smt/SmtRefinement.hpp +++ b/include/analysis/smt/SmtRefinement.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "StackUsageAnalyzer.hpp" @@ -15,9 +16,9 @@ namespace ctrace::stack::analysis::smt { enum class SmtFeasibility { - Feasible, - Infeasible, - Inconclusive + Feasible = 0, + Infeasible = 1, + Inconclusive = 2 }; inline bool smtRuleEnabled(const ctrace::stack::AnalysisConfig& config, std::string_view ruleId) diff --git a/include/analysis/smt/SolverOrchestrator.hpp b/include/analysis/smt/SolverOrchestrator.hpp index c96011d..1ac907d 100644 --- a/include/analysis/smt/SolverOrchestrator.hpp +++ b/include/analysis/smt/SolverOrchestrator.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "analysis/smt/SolverTypes.hpp" diff --git a/include/analysis/smt/SolverTypes.hpp b/include/analysis/smt/SolverTypes.hpp index 59c0e91..2022ad6 100644 --- a/include/analysis/smt/SolverTypes.hpp +++ b/include/analysis/smt/SolverTypes.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "analysis/smt/ConstraintIR.hpp" diff --git a/include/analysis/smt/TextUtil.hpp b/include/analysis/smt/TextUtil.hpp index c7b3b98..c0b497e 100644 --- a/include/analysis/smt/TextUtil.hpp +++ b/include/analysis/smt/TextUtil.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analysis/smt/backends/Z3Backend.hpp b/include/analysis/smt/backends/Z3Backend.hpp index 9d985a0..d42ea33 100644 --- a/include/analysis/smt/backends/Z3Backend.hpp +++ b/include/analysis/smt/backends/Z3Backend.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "analysis/smt/ISmtBackend.hpp" diff --git a/include/analyzer/AnalysisArtifactStore.hpp b/include/analyzer/AnalysisArtifactStore.hpp index 578df7d..ab60f73 100644 --- a/include/analyzer/AnalysisArtifactStore.hpp +++ b/include/analyzer/AnalysisArtifactStore.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analyzer/AnalysisPipeline.hpp b/include/analyzer/AnalysisPipeline.hpp index 6b68eb3..eb152d5 100644 --- a/include/analyzer/AnalysisPipeline.hpp +++ b/include/analyzer/AnalysisPipeline.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "StackUsageAnalyzer.hpp" diff --git a/include/analyzer/DerivedModuleArtifacts.hpp b/include/analyzer/DerivedModuleArtifacts.hpp index 2606eb9..84e7595 100644 --- a/include/analyzer/DerivedModuleArtifacts.hpp +++ b/include/analyzer/DerivedModuleArtifacts.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analyzer/DiagnosticEmitter.hpp b/include/analyzer/DiagnosticEmitter.hpp index f81f42f..5e130b5 100644 --- a/include/analyzer/DiagnosticEmitter.hpp +++ b/include/analyzer/DiagnosticEmitter.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "StackUsageAnalyzer.hpp" diff --git a/include/analyzer/HotspotProfiler.hpp b/include/analyzer/HotspotProfiler.hpp index 754b6ab..3e5ced9 100644 --- a/include/analyzer/HotspotProfiler.hpp +++ b/include/analyzer/HotspotProfiler.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analyzer/IRFactCollector.hpp b/include/analyzer/IRFactCollector.hpp index 6ae1db9..bb75a5f 100644 --- a/include/analyzer/IRFactCollector.hpp +++ b/include/analyzer/IRFactCollector.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analyzer/InstructionSubscriber.hpp b/include/analyzer/InstructionSubscriber.hpp index 41e7983..967f5d8 100644 --- a/include/analyzer/InstructionSubscriber.hpp +++ b/include/analyzer/InstructionSubscriber.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analyzer/LocationResolver.hpp b/include/analyzer/LocationResolver.hpp index b68b2ba..8c0c969 100644 --- a/include/analyzer/LocationResolver.hpp +++ b/include/analyzer/LocationResolver.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/analyzer/ModulePreparationService.hpp b/include/analyzer/ModulePreparationService.hpp index 22b60ed..51a0382 100644 --- a/include/analyzer/ModulePreparationService.hpp +++ b/include/analyzer/ModulePreparationService.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "StackUsageAnalyzer.hpp" diff --git a/include/analyzer/PerFunctionInstructionCache.hpp b/include/analyzer/PerFunctionInstructionCache.hpp index 39a0037..a5f689b 100644 --- a/include/analyzer/PerFunctionInstructionCache.hpp +++ b/include/analyzer/PerFunctionInstructionCache.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "analyzer/InstructionSubscriber.hpp" diff --git a/include/app/AnalyzerApp.hpp b/include/app/AnalyzerApp.hpp index d1d257e..e62510f 100644 --- a/include/app/AnalyzerApp.hpp +++ b/include/app/AnalyzerApp.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "cli/ArgParser.hpp" diff --git a/include/cli/ArgParser.hpp b/include/cli/ArgParser.hpp index f9a7ffa..2a3800d 100644 --- a/include/cli/ArgParser.hpp +++ b/include/cli/ArgParser.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include "StackUsageAnalyzer.hpp" diff --git a/include/helpers.hpp b/include/helpers.hpp index 06889c8..622638c 100644 --- a/include/helpers.hpp +++ b/include/helpers.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/include/mangle.hpp b/include/mangle.hpp index 1d7aad6..bb17b2e 100644 --- a/include/mangle.hpp +++ b/include/mangle.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include #include diff --git a/include/passes/ModulePasses.hpp b/include/passes/ModulePasses.hpp index 0ebe5b3..7996030 100644 --- a/include/passes/ModulePasses.hpp +++ b/include/passes/ModulePasses.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/main.cpp b/main.cpp index 94635bd..dc58767 100644 --- a/main.cpp +++ b/main.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "app/AnalyzerApp.hpp" #include "cli/ArgParser.hpp" diff --git a/run_test.py b/run_test.py index 5349d17..580c149 100755 --- a/run_test.py +++ b/run_test.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 import argparse import contextlib import importlib.util diff --git a/scripts/bench/pipeline_subscriber_ab.sh b/scripts/bench/pipeline_subscriber_ab.sh index 3cc7e15..9f9d1bc 100755 --- a/scripts/bench/pipeline_subscriber_ab.sh +++ b/scripts/bench/pipeline_subscriber_ab.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail ANALYZER="${1:-./build/stack_usage_analyzer}" diff --git a/scripts/build.sh b/scripts/build.sh index 1c99bee..8fa04c3 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/scripts/check-license-compliance.sh b/scripts/check-license-compliance.sh new file mode 100755 index 0000000..9209711 --- /dev/null +++ b/scripts/check-license-compliance.sh @@ -0,0 +1,45 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 +set -euo pipefail + +SCRIPT_DIR="$(cd -- "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +REPO_ROOT="$(cd -- "${SCRIPT_DIR}/.." && pwd)" + +cd "${REPO_ROOT}" + +if [[ ! -f "LICENSE" ]]; then + echo "ERROR: Missing LICENSE file at repository root." >&2 + exit 1 +fi + +if ! grep -Eq 'Apache License' LICENSE || ! grep -Eq 'Version 2\.0,[[:space:]]*January 2004' LICENSE; then + echo "ERROR: LICENSE file does not match Apache License 2.0 header markers." >&2 + exit 1 +fi + +missing_spdx_headers=() + +while IFS= read -r -d '' file; do + case "${file}" in + build/*|build-*/*|extern-project/build/*|extern-project/build-*/*|third_party/*|vendor/*|external/*) + continue + ;; + CMakeLists.txt|main.cpp|*.c|*.cc|*.cpp|*.cxx|*.h|*.hh|*.hpp|*.hxx|*.ipp|*.tpp|*.cmake|*.sh|*.py|*.yml|*.yaml) + ;; + *) + continue + ;; + esac + + if ! head -n 12 "${file}" | grep -Eq 'SPDX-License-Identifier:[[:space:]]*Apache-2\.0'; then + missing_spdx_headers+=("${file}") + fi +done < <(git ls-files -z) + +if ((${#missing_spdx_headers[@]} > 0)); then + echo "ERROR: Missing Apache-2.0 SPDX headers in these files:" >&2 + printf ' - %s\n' "${missing_spdx_headers[@]}" >&2 + exit 1 +fi + +echo "License compliance checks passed." diff --git a/scripts/ci/commit_checker.py b/scripts/ci/commit_checker.py index 94f44e5..779768c 100644 --- a/scripts/ci/commit_checker.py +++ b/scripts/ci/commit_checker.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 from __future__ import annotations import json diff --git a/scripts/ci/run_code_analysis.py b/scripts/ci/run_code_analysis.py index 60bca94..4ea7184 100755 --- a/scripts/ci/run_code_analysis.py +++ b/scripts/ci/run_code_analysis.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 from __future__ import annotations import argparse diff --git a/scripts/ci/semver_check.py b/scripts/ci/semver_check.py index 350ea57..1b03b47 100644 --- a/scripts/ci/semver_check.py +++ b/scripts/ci/semver_check.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 from __future__ import annotations import os diff --git a/scripts/docker/coretrace_entrypoint.py b/scripts/docker/coretrace_entrypoint.py index da1056f..713f9c0 100644 --- a/scripts/docker/coretrace_entrypoint.py +++ b/scripts/docker/coretrace_entrypoint.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 import argparse import json import os diff --git a/scripts/format-check.sh b/scripts/format-check.sh index 658ebec..423e36a 100755 --- a/scripts/format-check.sh +++ b/scripts/format-check.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail SCRIPT_DIR="$(cd -- "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/scripts/format.sh b/scripts/format.sh index 92112fa..2a8d428 100755 --- a/scripts/format.sh +++ b/scripts/format.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail SCRIPT_DIR="$(cd -- "$(dirname "${BASH_SOURCE[0]}")" && pwd)" diff --git a/scripts/git/commit_msg_checker.py b/scripts/git/commit_msg_checker.py index 512a79c..fc4aaac 100644 --- a/scripts/git/commit_msg_checker.py +++ b/scripts/git/commit_msg_checker.py @@ -1,4 +1,5 @@ #!/usr/bin/env python3 +# SPDX-License-Identifier: Apache-2.0 from __future__ import annotations import re diff --git a/scripts/setup-dev.sh b/scripts/setup-dev.sh index 4fc5478..7c9d0a7 100755 --- a/scripts/setup-dev.sh +++ b/scripts/setup-dev.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail if ! command -v python3 >/dev/null 2>&1; then diff --git a/src/StackUsageAnalyzer.cpp b/src/StackUsageAnalyzer.cpp index 8f100ff..07a956b 100644 --- a/src/StackUsageAnalyzer.cpp +++ b/src/StackUsageAnalyzer.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "StackUsageAnalyzer.hpp" #include "analyzer/AnalysisPipeline.hpp" diff --git a/src/analysis/AllocaUsage.cpp b/src/analysis/AllocaUsage.cpp index 373f2ef..2805b47 100644 --- a/src/analysis/AllocaUsage.cpp +++ b/src/analysis/AllocaUsage.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/AllocaUsage.hpp" #include diff --git a/src/analysis/AnalyzerUtils.cpp b/src/analysis/AnalyzerUtils.cpp index 458d84e..edb61f7 100644 --- a/src/analysis/AnalyzerUtils.cpp +++ b/src/analysis/AnalyzerUtils.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/AnalyzerUtils.hpp" #include diff --git a/src/analysis/BufferWriteModel.cpp b/src/analysis/BufferWriteModel.cpp index 58c6572..e85a971 100644 --- a/src/analysis/BufferWriteModel.cpp +++ b/src/analysis/BufferWriteModel.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/BufferWriteModel.hpp" #include "mangle.hpp" diff --git a/src/analysis/CommandInjectionAnalysis.cpp b/src/analysis/CommandInjectionAnalysis.cpp index 2880672..a1992c1 100644 --- a/src/analysis/CommandInjectionAnalysis.cpp +++ b/src/analysis/CommandInjectionAnalysis.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/CommandInjectionAnalysis.hpp" #include "analysis/AnalyzerUtils.hpp" diff --git a/src/analysis/CompileCommands.cpp b/src/analysis/CompileCommands.cpp index 3fbfae5..683cbbf 100644 --- a/src/analysis/CompileCommands.cpp +++ b/src/analysis/CompileCommands.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/CompileCommands.hpp" #include diff --git a/src/analysis/ConstParamAnalysis.cpp b/src/analysis/ConstParamAnalysis.cpp index f662a25..5a4960b 100644 --- a/src/analysis/ConstParamAnalysis.cpp +++ b/src/analysis/ConstParamAnalysis.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/ConstParamAnalysis.hpp" #include diff --git a/src/analysis/DuplicateIfCondition.cpp b/src/analysis/DuplicateIfCondition.cpp index 4a744e6..31e7d62 100644 --- a/src/analysis/DuplicateIfCondition.cpp +++ b/src/analysis/DuplicateIfCondition.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/DuplicateIfCondition.hpp" #include diff --git a/src/analysis/DynamicAlloca.cpp b/src/analysis/DynamicAlloca.cpp index 297d5df..137b640 100644 --- a/src/analysis/DynamicAlloca.cpp +++ b/src/analysis/DynamicAlloca.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/DynamicAlloca.hpp" #include diff --git a/src/analysis/FrontendDiagnostics.cpp b/src/analysis/FrontendDiagnostics.cpp index 67c8583..dd74a9d 100644 --- a/src/analysis/FrontendDiagnostics.cpp +++ b/src/analysis/FrontendDiagnostics.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/FrontendDiagnostics.hpp" #include diff --git a/src/analysis/FunctionFilter.cpp b/src/analysis/FunctionFilter.cpp index 966d04f..6c910c4 100644 --- a/src/analysis/FunctionFilter.cpp +++ b/src/analysis/FunctionFilter.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/FunctionFilter.hpp" #include diff --git a/src/analysis/GlobalReadBeforeWriteAnalysis.cpp b/src/analysis/GlobalReadBeforeWriteAnalysis.cpp index 712a4c1..c70602c 100644 --- a/src/analysis/GlobalReadBeforeWriteAnalysis.cpp +++ b/src/analysis/GlobalReadBeforeWriteAnalysis.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/GlobalReadBeforeWriteAnalysis.hpp" #include diff --git a/src/analysis/IRValueUtils.cpp b/src/analysis/IRValueUtils.cpp index 4b78912..e3d7480 100644 --- a/src/analysis/IRValueUtils.cpp +++ b/src/analysis/IRValueUtils.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/IRValueUtils.hpp" #include diff --git a/src/analysis/InputPipeline.cpp b/src/analysis/InputPipeline.cpp index 9ea21dc..8eaccbf 100644 --- a/src/analysis/InputPipeline.cpp +++ b/src/analysis/InputPipeline.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/InputPipeline.hpp" #include "analysis/CompileCommands.hpp" #include "analysis/FrontendDiagnostics.hpp" diff --git a/src/analysis/IntRanges.cpp b/src/analysis/IntRanges.cpp index c9970a1..d297ef3 100644 --- a/src/analysis/IntRanges.cpp +++ b/src/analysis/IntRanges.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/IntRanges.hpp" #include diff --git a/src/analysis/IntegerOverflowAnalysis.cpp b/src/analysis/IntegerOverflowAnalysis.cpp index d6085fe..01a334c 100644 --- a/src/analysis/IntegerOverflowAnalysis.cpp +++ b/src/analysis/IntegerOverflowAnalysis.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/IntegerOverflowAnalysis.hpp" #include "analysis/AnalyzerUtils.hpp" diff --git a/src/analysis/InvalidBaseReconstruction.cpp b/src/analysis/InvalidBaseReconstruction.cpp index 0b63655..d1e74a0 100644 --- a/src/analysis/InvalidBaseReconstruction.cpp +++ b/src/analysis/InvalidBaseReconstruction.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/InvalidBaseReconstruction.hpp" #include diff --git a/src/analysis/MemIntrinsicOverflow.cpp b/src/analysis/MemIntrinsicOverflow.cpp index d252c74..96d5172 100644 --- a/src/analysis/MemIntrinsicOverflow.cpp +++ b/src/analysis/MemIntrinsicOverflow.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/MemIntrinsicOverflow.hpp" #include "analysis/BufferWriteModel.hpp" diff --git a/src/analysis/NullDerefAnalysis.cpp b/src/analysis/NullDerefAnalysis.cpp index 6b6422a..3b19351 100644 --- a/src/analysis/NullDerefAnalysis.cpp +++ b/src/analysis/NullDerefAnalysis.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/NullDerefAnalysis.hpp" #include "analysis/AnalyzerUtils.hpp" diff --git a/src/analysis/OOBReadAnalysis.cpp b/src/analysis/OOBReadAnalysis.cpp index 63207f6..cb1a0db 100644 --- a/src/analysis/OOBReadAnalysis.cpp +++ b/src/analysis/OOBReadAnalysis.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/OOBReadAnalysis.hpp" #include "analysis/AnalyzerUtils.hpp" diff --git a/src/analysis/ParameterDebugBinding.cpp b/src/analysis/ParameterDebugBinding.cpp index 68c7efe..ec28dbe 100644 --- a/src/analysis/ParameterDebugBinding.cpp +++ b/src/analysis/ParameterDebugBinding.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/ParameterDebugBinding.hpp" #include diff --git a/src/analysis/Reachability.cpp b/src/analysis/Reachability.cpp index e9c94a2..6c394ca 100644 --- a/src/analysis/Reachability.cpp +++ b/src/analysis/Reachability.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/Reachability.hpp" #include "analysis/IRValueUtils.hpp" diff --git a/src/analysis/ResourceLifetimeAnalysis.cpp b/src/analysis/ResourceLifetimeAnalysis.cpp index 2c6263c..c9e316b 100644 --- a/src/analysis/ResourceLifetimeAnalysis.cpp +++ b/src/analysis/ResourceLifetimeAnalysis.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/ResourceLifetimeAnalysis.hpp" #include diff --git a/src/analysis/SizeMinusKWrites.cpp b/src/analysis/SizeMinusKWrites.cpp index ee98ef5..f2b8ad0 100644 --- a/src/analysis/SizeMinusKWrites.cpp +++ b/src/analysis/SizeMinusKWrites.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/SizeMinusKWrites.hpp" #include "analysis/IntRanges.hpp" diff --git a/src/analysis/StackBufferAnalysis.cpp b/src/analysis/StackBufferAnalysis.cpp index 98a46d8..837d9f9 100644 --- a/src/analysis/StackBufferAnalysis.cpp +++ b/src/analysis/StackBufferAnalysis.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/StackBufferAnalysis.hpp" #include diff --git a/src/analysis/StackComputation.cpp b/src/analysis/StackComputation.cpp index 92dc3e3..5520e74 100644 --- a/src/analysis/StackComputation.cpp +++ b/src/analysis/StackComputation.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/StackComputation.hpp" #include diff --git a/src/analysis/StackPointerEscape.cpp b/src/analysis/StackPointerEscape.cpp index 4ac486c..ba9e520 100644 --- a/src/analysis/StackPointerEscape.cpp +++ b/src/analysis/StackPointerEscape.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/StackPointerEscape.hpp" #include "analysis/IRValueUtils.hpp" #include "StackPointerEscapeInternal.hpp" diff --git a/src/analysis/StackPointerEscapeInternal.hpp b/src/analysis/StackPointerEscapeInternal.hpp index 5d7f2cb..74381ba 100644 --- a/src/analysis/StackPointerEscapeInternal.hpp +++ b/src/analysis/StackPointerEscapeInternal.hpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once #include diff --git a/src/analysis/StackPointerEscapeModel.cpp b/src/analysis/StackPointerEscapeModel.cpp index a722c19..375e565 100644 --- a/src/analysis/StackPointerEscapeModel.cpp +++ b/src/analysis/StackPointerEscapeModel.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "StackPointerEscapeInternal.hpp" #include "mangle.hpp" diff --git a/src/analysis/StackPointerEscapeResolver.cpp b/src/analysis/StackPointerEscapeResolver.cpp index 9faead4..e59276f 100644 --- a/src/analysis/StackPointerEscapeResolver.cpp +++ b/src/analysis/StackPointerEscapeResolver.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "StackPointerEscapeInternal.hpp" #include diff --git a/src/analysis/TOCTOUAnalysis.cpp b/src/analysis/TOCTOUAnalysis.cpp index 8fd2766..aa916bb 100644 --- a/src/analysis/TOCTOUAnalysis.cpp +++ b/src/analysis/TOCTOUAnalysis.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/TOCTOUAnalysis.hpp" #include "analysis/AnalyzerUtils.hpp" diff --git a/src/analysis/TypeConfusionAnalysis.cpp b/src/analysis/TypeConfusionAnalysis.cpp index d78233d..e536056 100644 --- a/src/analysis/TypeConfusionAnalysis.cpp +++ b/src/analysis/TypeConfusionAnalysis.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/TypeConfusionAnalysis.hpp" #include "analysis/AnalyzerUtils.hpp" diff --git a/src/analysis/UninitializedVarAnalysis.cpp b/src/analysis/UninitializedVarAnalysis.cpp index f3eea8a..55e2f72 100644 --- a/src/analysis/UninitializedVarAnalysis.cpp +++ b/src/analysis/UninitializedVarAnalysis.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/UninitializedVarAnalysis.hpp" #include "mangle.hpp" diff --git a/src/analysis/smt/SmtEncoding.cpp b/src/analysis/smt/SmtEncoding.cpp index 627fbe2..7000796 100644 --- a/src/analysis/smt/SmtEncoding.cpp +++ b/src/analysis/smt/SmtEncoding.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/smt/SmtEncoding.hpp" #include diff --git a/src/analysis/smt/SolverOrchestrator.cpp b/src/analysis/smt/SolverOrchestrator.cpp index 8ed13fe..3abe4c4 100644 --- a/src/analysis/smt/SolverOrchestrator.cpp +++ b/src/analysis/smt/SolverOrchestrator.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/smt/SolverOrchestrator.hpp" #include "analysis/smt/ISolverStrategy.hpp" diff --git a/src/analysis/smt/backends/Z3Backend.cpp b/src/analysis/smt/backends/Z3Backend.cpp index 1e6956c..5aa3feb 100644 --- a/src/analysis/smt/backends/Z3Backend.cpp +++ b/src/analysis/smt/backends/Z3Backend.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analysis/smt/backends/Z3Backend.hpp" #include diff --git a/src/analyzer/AnalysisPipeline.cpp b/src/analyzer/AnalysisPipeline.cpp index f38b8f2..e16b9f0 100644 --- a/src/analyzer/AnalysisPipeline.cpp +++ b/src/analyzer/AnalysisPipeline.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analyzer/AnalysisPipeline.hpp" #include "analyzer/AnalysisArtifactStore.hpp" diff --git a/src/analyzer/DiagnosticEmitter.cpp b/src/analyzer/DiagnosticEmitter.cpp index 60c6f94..0676603 100644 --- a/src/analyzer/DiagnosticEmitter.cpp +++ b/src/analyzer/DiagnosticEmitter.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analyzer/DiagnosticEmitter.hpp" #include "analyzer/LocationResolver.hpp" diff --git a/src/analyzer/HotspotProfiler.cpp b/src/analyzer/HotspotProfiler.cpp index ce05b4e..76bb0cb 100644 --- a/src/analyzer/HotspotProfiler.cpp +++ b/src/analyzer/HotspotProfiler.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analyzer/HotspotProfiler.hpp" #include diff --git a/src/analyzer/IRFactCollector.cpp b/src/analyzer/IRFactCollector.cpp index a09007f..c2cc666 100644 --- a/src/analyzer/IRFactCollector.cpp +++ b/src/analyzer/IRFactCollector.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analyzer/IRFactCollector.hpp" #include "analyzer/InstructionSubscriber.hpp" diff --git a/src/analyzer/LocationResolver.cpp b/src/analyzer/LocationResolver.cpp index 516d9ef..e3475c5 100644 --- a/src/analyzer/LocationResolver.cpp +++ b/src/analyzer/LocationResolver.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analyzer/LocationResolver.hpp" #include "analysis/AnalyzerUtils.hpp" diff --git a/src/analyzer/ModulePreparationService.cpp b/src/analyzer/ModulePreparationService.cpp index 23678cf..6dd5237 100644 --- a/src/analyzer/ModulePreparationService.cpp +++ b/src/analyzer/ModulePreparationService.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analyzer/ModulePreparationService.hpp" #include "analyzer/HotspotProfiler.hpp" diff --git a/src/analyzer/PerFunctionInstructionCache.cpp b/src/analyzer/PerFunctionInstructionCache.cpp index 6fc479b..65a9c35 100644 --- a/src/analyzer/PerFunctionInstructionCache.cpp +++ b/src/analyzer/PerFunctionInstructionCache.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "analyzer/PerFunctionInstructionCache.hpp" #include diff --git a/src/app/AnalyzerApp.cpp b/src/app/AnalyzerApp.cpp index 2ed644b..a9621d2 100644 --- a/src/app/AnalyzerApp.cpp +++ b/src/app/AnalyzerApp.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "app/AnalyzerApp.hpp" #include "StackUsageAnalyzer.hpp" diff --git a/src/cli/ArgParser.cpp b/src/cli/ArgParser.cpp index 1971080..82669e1 100644 --- a/src/cli/ArgParser.cpp +++ b/src/cli/ArgParser.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "cli/ArgParser.hpp" #include diff --git a/src/helpers.cpp b/src/helpers.cpp index 786c882..faa1311 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "helpers.hpp" namespace ctrace::stack diff --git a/src/mangle.cpp b/src/mangle.cpp index f5b7aff..bed2557 100644 --- a/src/mangle.cpp +++ b/src/mangle.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "mangle.hpp" namespace ctrace_tools diff --git a/src/passes/ModulePasses.cpp b/src/passes/ModulePasses.cpp index 82264bb..5f542eb 100644 --- a/src/passes/ModulePasses.cpp +++ b/src/passes/ModulePasses.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "passes/ModulePasses.hpp" #include diff --git a/src/report/ReportSerialization.cpp b/src/report/ReportSerialization.cpp index 9cfbc0e..aa5ce5e 100644 --- a/src/report/ReportSerialization.cpp +++ b/src/report/ReportSerialization.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "StackUsageAnalyzer.hpp" #include diff --git a/test/alloca/oversized-constant.c b/test/alloca/oversized-constant.c index f5bcc81..1377aee 100644 --- a/test/alloca/oversized-constant.c +++ b/test/alloca/oversized-constant.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/alloca/recursive-controlled-alloca.c b/test/alloca/recursive-controlled-alloca.c index 4c1e634..949ec33 100644 --- a/test/alloca/recursive-controlled-alloca.c +++ b/test/alloca/recursive-controlled-alloca.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/alloca/recursive-infinite-alloca.c b/test/alloca/recursive-infinite-alloca.c index 7d14cf4..f4558a0 100644 --- a/test/alloca/recursive-infinite-alloca.c +++ b/test/alloca/recursive-infinite-alloca.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/alloca/user-controlled.c b/test/alloca/user-controlled.c index b285978..a0f3c1b 100644 --- a/test/alloca/user-controlled.c +++ b/test/alloca/user-controlled.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/bound-storage/bound-storage-for-statement.c b/test/bound-storage/bound-storage-for-statement.c index a4c2449..ab8fbcf 100644 --- a/test/bound-storage/bound-storage-for-statement.c +++ b/test/bound-storage/bound-storage-for-statement.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int main(void) { char test[10]; diff --git a/test/bound-storage/bound-storage-if-statement.c b/test/bound-storage/bound-storage-if-statement.c index 3c18a5a..ec1ff27 100644 --- a/test/bound-storage/bound-storage-if-statement.c +++ b/test/bound-storage/bound-storage-if-statement.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // [!Info] multiple stores to stack buffer 'test1' in this function (2 store instruction(s), 2 distinct index expression(s)) // stores use different index expressions; verify indices are correct and non-overlapping int main(void) diff --git a/test/bound-storage/bound-storage.c b/test/bound-storage/bound-storage.c index 5f7614b..5e77acb 100644 --- a/test/bound-storage/bound-storage.c +++ b/test/bound-storage/bound-storage.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // [!Info] multiple stores to stack buffer 'test' in this function (4 store instruction(s), 3 distinct index expression(s)) // stores use different index expressions; verify indices are correct and non-overlapping int main(void) diff --git a/test/bound-storage/deep-alias.c b/test/bound-storage/deep-alias.c index a272252..0f9a6a2 100644 --- a/test/bound-storage/deep-alias.c +++ b/test/bound-storage/deep-alias.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // at line 5, column 0 // [ !Info! ] ConstParameterNotModified.Pointer: parameter 'src' in function 'deep_alias' is never used to modify the pointed object // ↳ current type: char *src diff --git a/test/bound-storage/global-array-overflow.c b/test/bound-storage/global-array-overflow.c index 6e8be3e..92fbf69 100644 --- a/test/bound-storage/global-array-overflow.c +++ b/test/bound-storage/global-array-overflow.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int gbuf[10]; int main(void) diff --git a/test/bound-storage/indirection-profonde-aliasing.c b/test/bound-storage/indirection-profonde-aliasing.c index 5291866..4db6b24 100644 --- a/test/bound-storage/indirection-profonde-aliasing.c +++ b/test/bound-storage/indirection-profonde-aliasing.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // [!Info] multiple stores to stack buffer 'test' in this function (6 store instruction(s), 6 distinct index expression(s)) // stores use different index expressions; verify indices are correct and non-overlapping int main(void) diff --git a/test/bound-storage/ne-narrowing-unsound.c b/test/bound-storage/ne-narrowing-unsound.c index 1b3f890..941e82b 100644 --- a/test/bound-storage/ne-narrowing-unsound.c +++ b/test/bound-storage/ne-narrowing-unsound.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 void ne_must_not_narrow_range(int i) { char buf[200]; diff --git a/test/bound-storage/ranges_test.c b/test/bound-storage/ranges_test.c index 47f3f95..0f9b6fc 100644 --- a/test/bound-storage/ranges_test.c +++ b/test/bound-storage/ranges_test.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include /* diff --git a/test/bound-storage/struct_array_overflow.c b/test/bound-storage/struct_array_overflow.c index 0969661..8d479a4 100644 --- a/test/bound-storage/struct_array_overflow.c +++ b/test/bound-storage/struct_array_overflow.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include struct S diff --git a/test/bound-storage/unreachable-detached.c b/test/bound-storage/unreachable-detached.c index 76d0d91..43631c3 100644 --- a/test/bound-storage/unreachable-detached.c +++ b/test/bound-storage/unreachable-detached.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 void unreachable_detached_region(void) { int i = 11; diff --git a/test/bound-storage/unreachable-multi-pred.c b/test/bound-storage/unreachable-multi-pred.c index a1bd815..16c9fc9 100644 --- a/test/bound-storage/unreachable-multi-pred.c +++ b/test/bound-storage/unreachable-multi-pred.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 void unreachable_multi_pred_mixed(int x) { diff --git a/test/bound-storage/unreachable-validation.c b/test/bound-storage/unreachable-validation.c index 137d71b..6e5f74c 100644 --- a/test/bound-storage/unreachable-validation.c +++ b/test/bound-storage/unreachable-validation.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 void unreachable_validation_local_const(void) { int i = 11; diff --git a/test/coretrace-legacy/AvoidDefaultArgumentsOnVirtualMethods.hh b/test/coretrace-legacy/AvoidDefaultArgumentsOnVirtualMethods.hh index b43f8c6..f547b2c 100644 --- a/test/coretrace-legacy/AvoidDefaultArgumentsOnVirtualMethods.hh +++ b/test/coretrace-legacy/AvoidDefaultArgumentsOnVirtualMethods.hh @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 class Base { public: diff --git a/test/coretrace-legacy/DestructorOfVirtualClass.hh b/test/coretrace-legacy/DestructorOfVirtualClass.hh index 94d9c5b..b4443b9 100644 --- a/test/coretrace-legacy/DestructorOfVirtualClass.hh +++ b/test/coretrace-legacy/DestructorOfVirtualClass.hh @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 class Base { public: diff --git a/test/coretrace-legacy/EmptyForStatement.cc b/test/coretrace-legacy/EmptyForStatement.cc index 99b5d1a..7f46bf5 100644 --- a/test/coretrace-legacy/EmptyForStatement.cc +++ b/test/coretrace-legacy/EmptyForStatement.cc @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int main() diff --git a/test/coretrace-legacy/RedundantIfStatement.c b/test/coretrace-legacy/RedundantIfStatement.c index b96632b..9c68b78 100644 --- a/test/coretrace-legacy/RedundantIfStatement.c +++ b/test/coretrace-legacy/RedundantIfStatement.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include bool isPositive(int x_test) diff --git a/test/coretrace-legacy/RedundantIfStatement.cc b/test/coretrace-legacy/RedundantIfStatement.cc index 7969a93..623222a 100644 --- a/test/coretrace-legacy/RedundantIfStatement.cc +++ b/test/coretrace-legacy/RedundantIfStatement.cc @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 bool isPositive(int x_test) { if (x_test > 0) diff --git a/test/coretrace-legacy/bad_function_pointer.cc b/test/coretrace-legacy/bad_function_pointer.cc index 6ffda92..2af6833 100644 --- a/test/coretrace-legacy/bad_function_pointer.cc +++ b/test/coretrace-legacy/bad_function_pointer.cc @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include typedef void (*FuncPtr)(int); diff --git a/test/coretrace-legacy/bound_index.cc b/test/coretrace-legacy/bound_index.cc index 9795151..42e5f6d 100644 --- a/test/coretrace-legacy/bound_index.cc +++ b/test/coretrace-legacy/bound_index.cc @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int a[10]; diff --git a/test/coretrace-legacy/buffer_overflow.cc b/test/coretrace-legacy/buffer_overflow.cc index 9396932..ccf2604 100644 --- a/test/coretrace-legacy/buffer_overflow.cc +++ b/test/coretrace-legacy/buffer_overflow.cc @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/coretrace-legacy/dead_code.cc b/test/coretrace-legacy/dead_code.cc index 63d0e40..5e2182b 100644 --- a/test/coretrace-legacy/dead_code.cc +++ b/test/coretrace-legacy/dead_code.cc @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int compute(int x) { int y = x + 1; diff --git a/test/coretrace-legacy/double_free.c b/test/coretrace-legacy/double_free.c index 7370462..1caae95 100644 --- a/test/coretrace-legacy/double_free.c +++ b/test/coretrace-legacy/double_free.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // double_free.c #include diff --git a/test/coretrace-legacy/format_problem.c b/test/coretrace-legacy/format_problem.c index 89f0efe..a69bf1a 100644 --- a/test/coretrace-legacy/format_problem.c +++ b/test/coretrace-legacy/format_problem.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include void print_input(char* input) diff --git a/test/coretrace-legacy/if_collapse.c b/test/coretrace-legacy/if_collapse.c index 1520fe1..12bbde9 100644 --- a/test/coretrace-legacy/if_collapse.c +++ b/test/coretrace-legacy/if_collapse.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int main() { int iii = 0, jjj = 1; diff --git a/test/coretrace-legacy/if_constant_expr.c b/test/coretrace-legacy/if_constant_expr.c index 4eb067d..f952fba 100644 --- a/test/coretrace-legacy/if_constant_expr.c +++ b/test/coretrace-legacy/if_constant_expr.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int main() { const int c_test = 1; diff --git a/test/coretrace-legacy/null_pointer.c b/test/coretrace-legacy/null_pointer.c index 30c33a5..8d4830e 100644 --- a/test/coretrace-legacy/null_pointer.c +++ b/test/coretrace-legacy/null_pointer.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // null_pointer_subtle.c #include diff --git a/test/coretrace-legacy/partitioning.cc b/test/coretrace-legacy/partitioning.cc index a839a0f..86d24aa 100644 --- a/test/coretrace-legacy/partitioning.cc +++ b/test/coretrace-legacy/partitioning.cc @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // init_with_error.c #include diff --git a/test/coretrace-legacy/pointer_comparison_analysis.cc b/test/coretrace-legacy/pointer_comparison_analysis.cc index 1cfdc95..af65882 100644 --- a/test/coretrace-legacy/pointer_comparison_analysis.cc +++ b/test/coretrace-legacy/pointer_comparison_analysis.cc @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // pointer_cmp.c #include #include diff --git a/test/coretrace-legacy/pointer_overflow.cc b/test/coretrace-legacy/pointer_overflow.cc index 71042a1..131156e 100644 --- a/test/coretrace-legacy/pointer_overflow.cc +++ b/test/coretrace-legacy/pointer_overflow.cc @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int main(void) diff --git a/test/coretrace-legacy/too_many_methods.cc b/test/coretrace-legacy/too_many_methods.cc index 663616d..8111b62 100644 --- a/test/coretrace-legacy/too_many_methods.cc +++ b/test/coretrace-legacy/too_many_methods.cc @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 class MyClass { public: diff --git a/test/coretrace-legacy/unaligned_dereferencing.cc b/test/coretrace-legacy/unaligned_dereferencing.cc index 2794760..c26b79e 100644 --- a/test/coretrace-legacy/unaligned_dereferencing.cc +++ b/test/coretrace-legacy/unaligned_dereferencing.cc @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // unaligned.c #include diff --git a/test/cpy-buffer/bad-usage-memcpy.c b/test/cpy-buffer/bad-usage-memcpy.c index c8a431a..4c349f4 100644 --- a/test/cpy-buffer/bad-usage-memcpy.c +++ b/test/cpy-buffer/bad-usage-memcpy.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include void foo(char* src) diff --git a/test/cpy-buffer/bad-usage-memset.c b/test/cpy-buffer/bad-usage-memset.c index 38d9dab..34dfe32 100644 --- a/test/cpy-buffer/bad-usage-memset.c +++ b/test/cpy-buffer/bad-usage-memset.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include // Function: foo diff --git a/test/cpy-buffer/ignore-non-mem-call.c b/test/cpy-buffer/ignore-non-mem-call.c index 7a3c288..426dece 100644 --- a/test/cpy-buffer/ignore-non-mem-call.c +++ b/test/cpy-buffer/ignore-non-mem-call.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include diff --git a/test/cpy-buffer/memcpy-name-false-positive.c b/test/cpy-buffer/memcpy-name-false-positive.c index 4ba1be6..6c216c0 100644 --- a/test/cpy-buffer/memcpy-name-false-positive.c +++ b/test/cpy-buffer/memcpy-name-false-positive.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include void telemetry_memcpy(char* dst, const char* src, size_t n) diff --git a/test/cpy-buffer/name-contains-memintrinsics.c b/test/cpy-buffer/name-contains-memintrinsics.c index bd4c558..f2edcc6 100644 --- a/test/cpy-buffer/name-contains-memintrinsics.c +++ b/test/cpy-buffer/name-contains-memintrinsics.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include // buffer-model: test/cpy-buffer/models/custom-wrapper-buffer-model.txt diff --git a/test/cpy-buffer/unbounded-strcpy-model.c b/test/cpy-buffer/unbounded-strcpy-model.c index f02db45..83b078c 100644 --- a/test/cpy-buffer/unbounded-strcpy-model.c +++ b/test/cpy-buffer/unbounded-strcpy-model.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include // buffer-model: models/buffer-overflow/generic.txt diff --git a/test/diagnostics/duplicate-else-if-!.cpp b/test/diagnostics/duplicate-else-if-!.cpp index 2a63fb5..765531e 100644 --- a/test/diagnostics/duplicate-else-if-!.cpp +++ b/test/diagnostics/duplicate-else-if-!.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/diagnostics/duplicate-else-if-basic.c b/test/diagnostics/duplicate-else-if-basic.c index b011deb..686e394 100644 --- a/test/diagnostics/duplicate-else-if-basic.c +++ b/test/diagnostics/duplicate-else-if-basic.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int main(int argc, char* argv[]) diff --git a/test/diagnostics/duplicate-else-if-bool-equals-false.cpp b/test/diagnostics/duplicate-else-if-bool-equals-false.cpp index 33a619d..b057fd7 100644 --- a/test/diagnostics/duplicate-else-if-bool-equals-false.cpp +++ b/test/diagnostics/duplicate-else-if-bool-equals-false.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include struct Config diff --git a/test/diagnostics/duplicate-else-if-bool.c b/test/diagnostics/duplicate-else-if-bool.c index a3e2583..1e0e2c6 100644 --- a/test/diagnostics/duplicate-else-if-bool.c +++ b/test/diagnostics/duplicate-else-if-bool.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int main(int argc, char* argv[]) diff --git a/test/diagnostics/duplicate-else-if-call.c b/test/diagnostics/duplicate-else-if-call.c index 8490150..9134a7a 100644 --- a/test/diagnostics/duplicate-else-if-call.c +++ b/test/diagnostics/duplicate-else-if-call.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include static int same_flag(const char* arg) diff --git a/test/diagnostics/duplicate-else-if-commutative.c b/test/diagnostics/duplicate-else-if-commutative.c index 573cc3c..eea5412 100644 --- a/test/diagnostics/duplicate-else-if-commutative.c +++ b/test/diagnostics/duplicate-else-if-commutative.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int main(int argc, char* argv[]) { int num = argc - 1; diff --git a/test/diagnostics/duplicate-else-if-distinct.c b/test/diagnostics/duplicate-else-if-distinct.c index e3cfed5..8e9d28a 100644 --- a/test/diagnostics/duplicate-else-if-distinct.c +++ b/test/diagnostics/duplicate-else-if-distinct.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // not contains: [!] unreachable else-if branch: condition is equivalent to a previous 'if' condition int main(int argc, char* argv[]) { diff --git a/test/diagnostics/duplicate-else-if-enum-class.cpp b/test/diagnostics/duplicate-else-if-enum-class.cpp index 4e3fc2f..d64b101 100644 --- a/test/diagnostics/duplicate-else-if-enum-class.cpp +++ b/test/diagnostics/duplicate-else-if-enum-class.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 enum class DiagnosticSeverity { Info = 0, diff --git a/test/diagnostics/duplicate-else-if-enum.c b/test/diagnostics/duplicate-else-if-enum.c index 9e13ecf..41dcdd5 100644 --- a/test/diagnostics/duplicate-else-if-enum.c +++ b/test/diagnostics/duplicate-else-if-enum.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef enum DiagnosticSeverity { Info = 0, diff --git a/test/diagnostics/duplicate-else-if-enum.cpp b/test/diagnostics/duplicate-else-if-enum.cpp index 0221233..9cb2877 100644 --- a/test/diagnostics/duplicate-else-if-enum.cpp +++ b/test/diagnostics/duplicate-else-if-enum.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 enum DiagnosticSeverity { Info = 0, diff --git a/test/diagnostics/duplicate-else-if-namespace-class.cpp b/test/diagnostics/duplicate-else-if-namespace-class.cpp index 6f3b691..957d32c 100644 --- a/test/diagnostics/duplicate-else-if-namespace-class.cpp +++ b/test/diagnostics/duplicate-else-if-namespace-class.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include namespace demo diff --git a/test/diagnostics/duplicate-else-if-nested-loop.c b/test/diagnostics/duplicate-else-if-nested-loop.c index 8155806..c29df22 100644 --- a/test/diagnostics/duplicate-else-if-nested-loop.c +++ b/test/diagnostics/duplicate-else-if-nested-loop.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #define IS_ZERO(x) ((x) == 0) int main(int argc, char* argv[]) diff --git a/test/diagnostics/duplicate-else-if-nested-loop_2.c b/test/diagnostics/duplicate-else-if-nested-loop_2.c index cd8d90f..7bd0e2e 100644 --- a/test/diagnostics/duplicate-else-if-nested-loop_2.c +++ b/test/diagnostics/duplicate-else-if-nested-loop_2.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #define IS_ZERO(x) ((x) == 0) diff --git a/test/diagnostics/duplicate-else-if-nested-loop_boolean_expr.c b/test/diagnostics/duplicate-else-if-nested-loop_boolean_expr.c index 1d08d16..aa67966 100644 --- a/test/diagnostics/duplicate-else-if-nested-loop_boolean_expr.c +++ b/test/diagnostics/duplicate-else-if-nested-loop_boolean_expr.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/diagnostics/duplicate-else-if-ptr.c b/test/diagnostics/duplicate-else-if-ptr.c index ed79898..35d85cd 100644 --- a/test/diagnostics/duplicate-else-if-ptr.c +++ b/test/diagnostics/duplicate-else-if-ptr.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/diagnostics/duplicate-else-if-separate.c b/test/diagnostics/duplicate-else-if-separate.c index 1352356..276ebdf 100644 --- a/test/diagnostics/duplicate-else-if-separate.c +++ b/test/diagnostics/duplicate-else-if-separate.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include // not contains: [!] unreachable else-if branch: condition is equivalent to a previous 'if' condition diff --git a/test/diagnostics/duplicate-else-if-short-circuit-distinct.c b/test/diagnostics/duplicate-else-if-short-circuit-distinct.c index 440ff0f..366fecb 100644 --- a/test/diagnostics/duplicate-else-if-short-circuit-distinct.c +++ b/test/diagnostics/duplicate-else-if-short-circuit-distinct.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include // not contains: unreachable else-if branch: condition is equivalent to a previous 'if' condition diff --git a/test/diagnostics/duplicate-else-if-std_string.cpp b/test/diagnostics/duplicate-else-if-std_string.cpp index 2e16127..5bc02d9 100644 --- a/test/diagnostics/duplicate-else-if-std_string.cpp +++ b/test/diagnostics/duplicate-else-if-std_string.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include void foo(void) diff --git a/test/diagnostics/duplicate-else-if-threshold-vs-limit.cpp b/test/diagnostics/duplicate-else-if-threshold-vs-limit.cpp index 476d6f4..cc9ae4a 100644 --- a/test/diagnostics/duplicate-else-if-threshold-vs-limit.cpp +++ b/test/diagnostics/duplicate-else-if-threshold-vs-limit.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // not contains: unreachable else-if branch: condition is equivalent to a previous 'if' condition int classify_alloca_case(bool sizeIsConst, unsigned long long sizeBytes, bool hasUpperBound, unsigned long long upperBoundBytes, diff --git a/test/diagnostics/duplicate-nested-if.c b/test/diagnostics/duplicate-nested-if.c index 2b9c49b..e46a771 100644 --- a/test/diagnostics/duplicate-nested-if.c +++ b/test/diagnostics/duplicate-nested-if.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int main(int argc, char* argv[]) { int num = argc - 1; diff --git a/test/diagnostics/duplicate-nested-if_2.c b/test/diagnostics/duplicate-nested-if_2.c index 4d97a3b..e378afb 100644 --- a/test/diagnostics/duplicate-nested-if_2.c +++ b/test/diagnostics/duplicate-nested-if_2.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int main(int argc, char* argv[]) { int num = argc - 1; diff --git a/test/escape-stack/direct-callback.c b/test/escape-stack/direct-callback.c index 1e02fa7..2566116 100644 --- a/test/escape-stack/direct-callback.c +++ b/test/escape-stack/direct-callback.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // // case_call_arg.c // void sink(char* p); diff --git a/test/escape-stack/global-buf.c b/test/escape-stack/global-buf.c index 3ae91ca..2ce798c 100644 --- a/test/escape-stack/global-buf.c +++ b/test/escape-stack/global-buf.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // tests/stack_escape_global.c static char* g; diff --git a/test/escape-stack/global-struct.c b/test/escape-stack/global-struct.c index ac08420..626957b 100644 --- a/test/escape-stack/global-struct.c +++ b/test/escape-stack/global-struct.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct Holder { char* p; diff --git a/test/escape-stack/indirect-callback-unknown-target-with-safe-candidate.c b/test/escape-stack/indirect-callback-unknown-target-with-safe-candidate.c index 293edfc..1367ce2 100644 --- a/test/escape-stack/indirect-callback-unknown-target-with-safe-candidate.c +++ b/test/escape-stack/indirect-callback-unknown-target-with-safe-candidate.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void (*cb_t)(char*); static void safe_cb(char* p) diff --git a/test/escape-stack/indirect-callback.c b/test/escape-stack/indirect-callback.c index 139ee15..c7d455b 100644 --- a/test/escape-stack/indirect-callback.c +++ b/test/escape-stack/indirect-callback.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void (*cb_t)(char*); void use_callback(cb_t cb) diff --git a/test/escape-stack/interproc-escape.c b/test/escape-stack/interproc-escape.c index e3d4b37..7faabe6 100644 --- a/test/escape-stack/interproc-escape.c +++ b/test/escape-stack/interproc-escape.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // static char* g_ptr; // static void store_global(char* p) diff --git a/test/escape-stack/lambda-capture-by-ref.cpp b/test/escape-stack/lambda-capture-by-ref.cpp index 10f8d96..984df0d 100644 --- a/test/escape-stack/lambda-capture-by-ref.cpp +++ b/test/escape-stack/lambda-capture-by-ref.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int compute_range(int input) { int pred = input; diff --git a/test/escape-stack/lambda-capture-no-escape.cpp b/test/escape-stack/lambda-capture-no-escape.cpp index 72b2c71..f7640f2 100644 --- a/test/escape-stack/lambda-capture-no-escape.cpp +++ b/test/escape-stack/lambda-capture-no-escape.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // Test: lambda capturing local variables by reference should NOT trigger // StackPointerEscape, because the closure lives on the same stack frame. diff --git a/test/escape-stack/out_param.c b/test/escape-stack/out_param.c index 47f03da..b490ed4 100644 --- a/test/escape-stack/out_param.c +++ b/test/escape-stack/out_param.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 void leak_out_param(char** out) { char buf[10]; diff --git a/test/escape-stack/pointer-slot-out-param-escape.c b/test/escape-stack/pointer-slot-out-param-escape.c index af9deb0..4c415ae 100644 --- a/test/escape-stack/pointer-slot-out-param-escape.c +++ b/test/escape-stack/pointer-slot-out-param-escape.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 void leak_pointer_slot(int*** out) { int* p = 0; diff --git a/test/escape-stack/return-buf.c b/test/escape-stack/return-buf.c index cd39b4f..21a6764 100644 --- a/test/escape-stack/return-buf.c +++ b/test/escape-stack/return-buf.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 char* ret_buf(void) { char buf[10]; diff --git a/test/escape-stack/return-local-handle-from-outparam-no-escape.c b/test/escape-stack/return-local-handle-from-outparam-no-escape.c index fc480a6..67dadb8 100644 --- a/test/escape-stack/return-local-handle-from-outparam-no-escape.c +++ b/test/escape-stack/return-local-handle-from-outparam-no-escape.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* Handle; void acquire_handle(Handle* out); diff --git a/test/escape-stack/return-stack-address-through-pointer-slot.c b/test/escape-stack/return-stack-address-through-pointer-slot.c index 47d9a54..1e4f7ec 100644 --- a/test/escape-stack/return-stack-address-through-pointer-slot.c +++ b/test/escape-stack/return-stack-address-through-pointer-slot.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 char* leak_through_slot(void) { char buf[8]; diff --git a/test/escape-stack/stack_escape.c b/test/escape-stack/stack_escape.c index 6bb2153..7eab31b 100644 --- a/test/escape-stack/stack_escape.c +++ b/test/escape-stack/stack_escape.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 char* g_ptr; struct Holder diff --git a/test/escape-stack/virtual-local-capture.cpp b/test/escape-stack/virtual-local-capture.cpp index 03e962e..e6b61e7 100644 --- a/test/escape-stack/virtual-local-capture.cpp +++ b/test/escape-stack/virtual-local-capture.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 static const int* g_ptr = nullptr; struct Base diff --git a/test/escape-stack/virtual-strategy-local-no-escape.cpp b/test/escape-stack/virtual-strategy-local-no-escape.cpp index 3a62837..4028f90 100644 --- a/test/escape-stack/virtual-strategy-local-no-escape.cpp +++ b/test/escape-stack/virtual-strategy-local-no-escape.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include #include diff --git a/test/escape-stack/virtual-temp-unknown-target-no-escape.cpp b/test/escape-stack/virtual-temp-unknown-target-no-escape.cpp index 111f85b..dd96843 100644 --- a/test/escape-stack/virtual-temp-unknown-target-no-escape.cpp +++ b/test/escape-stack/virtual-temp-unknown-target-no-escape.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include struct Base diff --git a/test/false-positif/unique_ptr_state.cpp b/test/false-positif/unique_ptr_state.cpp index 593b408..3400111 100644 --- a/test/false-positif/unique_ptr_state.cpp +++ b/test/false-positif/unique_ptr_state.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 static void make_unique_sink(char* p) { (void)p; diff --git a/test/false-positive-repro/command-buffer-wrapper-balanced.c b/test/false-positive-repro/command-buffer-wrapper-balanced.c index 345ddf4..da6fce4 100644 --- a/test/false-positive-repro/command-buffer-wrapper-balanced.c +++ b/test/false-positive-repro/command-buffer-wrapper-balanced.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef struct VkDevice_T* VkDevice; typedef struct VkCommandPool_T* VkCommandPool; typedef struct VkQueue_T* VkQueue; diff --git a/test/false-positive-repro/create-info-compile-time-disabled.cpp b/test/false-positive-repro/create-info-compile-time-disabled.cpp index 9b48f43..e309f21 100644 --- a/test/false-positive-repro/create-info-compile-time-disabled.cpp +++ b/test/false-positive-repro/create-info-compile-time-disabled.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct CreateInfo { int tag; diff --git a/test/false-positive-repro/create-info-memset.cpp b/test/false-positive-repro/create-info-memset.cpp index 168b1e5..2741744 100644 --- a/test/false-positive-repro/create-info-memset.cpp +++ b/test/false-positive-repro/create-info-memset.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct CreateInfo { int tag; diff --git a/test/false-positive-repro/descriptor-stack-escape.c b/test/false-positive-repro/descriptor-stack-escape.c index e254977..de125e4 100644 --- a/test/false-positive-repro/descriptor-stack-escape.c +++ b/test/false-positive-repro/descriptor-stack-escape.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef struct BufferInfo { int range; diff --git a/test/false-positive-repro/duplicate-if-unreachable-elseif-fp.cpp b/test/false-positive-repro/duplicate-if-unreachable-elseif-fp.cpp index e2ec256..66231e5 100644 --- a/test/false-positive-repro/duplicate-if-unreachable-elseif-fp.cpp +++ b/test/false-positive-repro/duplicate-if-unreachable-elseif-fp.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 enum class InitState { Uninit, diff --git a/test/false-positive-repro/resource-cleanup-double-release.cpp b/test/false-positive-repro/resource-cleanup-double-release.cpp index 5cb5414..9ee5064 100644 --- a/test/false-positive-repro/resource-cleanup-double-release.cpp +++ b/test/false-positive-repro/resource-cleanup-double-release.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include typedef struct VkDevice_T* VkDevice; diff --git a/test/false-positive-repro/resource-wrapper-double-release.c b/test/false-positive-repro/resource-wrapper-double-release.c index c45b5c3..4e7c395 100644 --- a/test/false-positive-repro/resource-wrapper-double-release.c +++ b/test/false-positive-repro/resource-wrapper-double-release.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef struct VkDevice_T* VkDevice; typedef struct VkShaderModule_T* VkShaderModule; typedef struct VkShaderModuleCreateInfo diff --git a/test/false-positive-repro/stb-like-header-uninitialized.c b/test/false-positive-repro/stb-like-header-uninitialized.c index 1072f8e..21f96e9 100644 --- a/test/false-positive-repro/stb-like-header-uninitialized.c +++ b/test/false-positive-repro/stb-like-header-uninitialized.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef unsigned char u8; typedef struct Z diff --git a/test/false-positive-repro/stb-like-next-code-uninitialized.c b/test/false-positive-repro/stb-like-next-code-uninitialized.c index 5e1a79d..953be49 100644 --- a/test/false-positive-repro/stb-like-next-code-uninitialized.c +++ b/test/false-positive-repro/stb-like-next-code-uninitialized.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef unsigned char u8; typedef struct Huff diff --git a/test/false-positive-repro/stb-like-struct-double-release.c b/test/false-positive-repro/stb-like-struct-double-release.c index bdd6aa0..2f7b6af 100644 --- a/test/false-positive-repro/stb-like-struct-double-release.c +++ b/test/false-positive-repro/stb-like-struct-double-release.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef struct P { char* header; diff --git a/test/false-positive-repro/stb-vendor-header-filter.c b/test/false-positive-repro/stb-vendor-header-filter.c index 6884f06..301d433 100644 --- a/test/false-positive-repro/stb-vendor-header-filter.c +++ b/test/false-positive-repro/stb-vendor-header-filter.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "vendor/stb_image.h" int fp_stb_vendor_header_filter(void) diff --git a/test/false-positive-repro/stbi-wrapper-leak.c b/test/false-positive-repro/stbi-wrapper-leak.c index 8c65ecf..a82a423 100644 --- a/test/false-positive-repro/stbi-wrapper-leak.c +++ b/test/false-positive-repro/stbi-wrapper-leak.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef unsigned long size_t; extern void* malloc(size_t size); diff --git a/test/false-positive-repro/uninitialized-beststack-est.cpp b/test/false-positive-repro/uninitialized-beststack-est.cpp index cd71838..f1e28c0 100644 --- a/test/false-positive-repro/uninitialized-beststack-est.cpp +++ b/test/false-positive-repro/uninitialized-beststack-est.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include struct StackEstimateLike diff --git a/test/false-positive-repro/uninitialized-default-config-wrapper.cpp b/test/false-positive-repro/uninitialized-default-config-wrapper.cpp index c4821a1..9ea7106 100644 --- a/test/false-positive-repro/uninitialized-default-config-wrapper.cpp +++ b/test/false-positive-repro/uninitialized-default-config-wrapper.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct AnalysisConfigLike { unsigned long long stackLimit = 8ull * 1024ull * 1024ull; diff --git a/test/false-positive-repro/uninitialized-info-temp-map.cpp b/test/false-positive-repro/uninitialized-info-temp-map.cpp index 4d36a49..691cfe4 100644 --- a/test/false-positive-repro/uninitialized-info-temp-map.cpp +++ b/test/false-positive-repro/uninitialized-info-temp-map.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/false-positive-repro/uninitialized-local-maxcallee.cpp b/test/false-positive-repro/uninitialized-local-maxcallee.cpp index fcf4572..1d81d53 100644 --- a/test/false-positive-repro/uninitialized-local-maxcallee.cpp +++ b/test/false-positive-repro/uninitialized-local-maxcallee.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include struct StackEstimateLike diff --git a/test/false-positive-repro/uninitialized-merged-return.cpp b/test/false-positive-repro/uninitialized-merged-return.cpp index 4c1df39..64e5ca5 100644 --- a/test/false-positive-repro/uninitialized-merged-return.cpp +++ b/test/false-positive-repro/uninitialized-merged-return.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include struct AnalysisResultLike diff --git a/test/false-positive-repro/vendor/stb_image.h b/test/false-positive-repro/vendor/stb_image.h index 2bebc7b..a8be2a7 100644 --- a/test/false-positive-repro/vendor/stb_image.h +++ b/test/false-positive-repro/vendor/stb_image.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #ifndef TEST_FALSE_POSITIVE_REPRO_VENDOR_STB_IMAGE_H #define TEST_FALSE_POSITIVE_REPRO_VENDOR_STB_IMAGE_H diff --git a/test/false-positive-repro/vk-update-descriptor-immediate-consume.c b/test/false-positive-repro/vk-update-descriptor-immediate-consume.c index 60b3a60..f857d1d 100644 --- a/test/false-positive-repro/vk-update-descriptor-immediate-consume.c +++ b/test/false-positive-repro/vk-update-descriptor-immediate-consume.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // escape-model: models/stack-escape/generic.txt typedef void* VkDevice; diff --git a/test/false-positive-repro/vk-update-descriptor-index-accessor.cpp b/test/false-positive-repro/vk-update-descriptor-index-accessor.cpp index a8016d8..dc34894 100644 --- a/test/false-positive-repro/vk-update-descriptor-index-accessor.cpp +++ b/test/false-positive-repro/vk-update-descriptor-index-accessor.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // escape-model: models/stack-escape/generic.txt typedef void* VkDevice; diff --git a/test/false-positive-repro/vulkan-out-param-uninitialized.c b/test/false-positive-repro/vulkan-out-param-uninitialized.c index 765c252..fd59275 100644 --- a/test/false-positive-repro/vulkan-out-param-uninitialized.c +++ b/test/false-positive-repro/vulkan-out-param-uninitialized.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef unsigned int uint32_t; typedef void* VkDevice; typedef int VkResult; diff --git a/test/integer-overflow/cross-tu-tricky-def.c b/test/integer-overflow/cross-tu-tricky-def.c index 2230d53..9600fa4 100644 --- a/test/integer-overflow/cross-tu-tricky-def.c +++ b/test/integer-overflow/cross-tu-tricky-def.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include #include diff --git a/test/integer-overflow/cross-tu-tricky-use.c b/test/integer-overflow/cross-tu-tricky-use.c index 7517460..e7c2927 100644 --- a/test/integer-overflow/cross-tu-tricky-use.c +++ b/test/integer-overflow/cross-tu-tricky-use.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int io_cross_signed_overflow(int a, int b, int gate1, int gate2); diff --git a/test/local-storage/c/extra-multiple-large-frame.c b/test/local-storage/c/extra-multiple-large-frame.c index caaac64..6eabd16 100644 --- a/test/local-storage/c/extra-multiple-large-frame.c +++ b/test/local-storage/c/extra-multiple-large-frame.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int main(void) diff --git a/test/local-storage/c/multiple-large-frame.c b/test/local-storage/c/multiple-large-frame.c index 81f5157..6bad206 100644 --- a/test/local-storage/c/multiple-large-frame.c +++ b/test/local-storage/c/multiple-large-frame.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int main(void) { // stack-limit: 30 diff --git a/test/local-storage/c/stack-callee-caller.c b/test/local-storage/c/stack-callee-caller.c index 3f9d1c9..086495e 100644 --- a/test/local-storage/c/stack-callee-caller.c +++ b/test/local-storage/c/stack-callee-caller.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int foo(void) { // local stack: 8192000000 bytes diff --git a/test/local-storage/c/stack-exhaustion-large-frame.c b/test/local-storage/c/stack-exhaustion-large-frame.c index 882ed31..0c2b455 100644 --- a/test/local-storage/c/stack-exhaustion-large-frame.c +++ b/test/local-storage/c/stack-exhaustion-large-frame.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #define SIZE_LARGE 8192000000 #define SIZE_SMALL (SIZE_LARGE / 2) diff --git a/test/multiple-storage/initializer-list-compiler-temp-no-diag.cpp b/test/multiple-storage/initializer-list-compiler-temp-no-diag.cpp index 674ac84..ca93c23 100644 --- a/test/multiple-storage/initializer-list-compiler-temp-no-diag.cpp +++ b/test/multiple-storage/initializer-list-compiler-temp-no-diag.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include static int sum_values(std::initializer_list values) diff --git a/test/multiple-storage/same-index-expression.c b/test/multiple-storage/same-index-expression.c index b5bb744..f5b64a3 100644 --- a/test/multiple-storage/same-index-expression.c +++ b/test/multiple-storage/same-index-expression.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 void same_index_store(void) { char buf[10]; diff --git a/test/multiple-storage/same-storage.c b/test/multiple-storage/same-storage.c index fbef752..c004ebb 100644 --- a/test/multiple-storage/same-storage.c +++ b/test/multiple-storage/same-storage.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include void foo(void) diff --git a/test/no-error/basic-main.c b/test/no-error/basic-main.c index 3559c53..74b2d04 100644 --- a/test/no-error/basic-main.c +++ b/test/no-error/basic-main.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int main(void) { return 0; diff --git a/test/offset_of-container_of/container_of_correct_member_offset_ok.c b/test/offset_of-container_of/container_of_correct_member_offset_ok.c index 21f10d2..ca12252 100644 --- a/test/offset_of-container_of/container_of_correct_member_offset_ok.c +++ b/test/offset_of-container_of/container_of_correct_member_offset_ok.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include #include diff --git a/test/offset_of-container_of/container_of_wrong_member_offset_error.c b/test/offset_of-container_of/container_of_wrong_member_offset_error.c index ba3239d..0755102 100644 --- a/test/offset_of-container_of/container_of_wrong_member_offset_error.c +++ b/test/offset_of-container_of/container_of_wrong_member_offset_error.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include #include diff --git a/test/offset_of-container_of/container_of_wrong_offset_and_ok.c b/test/offset_of-container_of/container_of_wrong_offset_and_ok.c index 641b978..ea8dd21 100644 --- a/test/offset_of-container_of/container_of_wrong_offset_and_ok.c +++ b/test/offset_of-container_of/container_of_wrong_offset_and_ok.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/offset_of-container_of/gep_nested_member_projection_no_diag.cpp b/test/offset_of-container_of/gep_nested_member_projection_no_diag.cpp index 8a4a2f8..b33e445 100644 --- a/test/offset_of-container_of/gep_nested_member_projection_no_diag.cpp +++ b/test/offset_of-container_of/gep_nested_member_projection_no_diag.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct SubresourceRangeLike { int aspectMask; diff --git a/test/offset_of-container_of/gep_nested_subobject_reference_no_diag.cpp b/test/offset_of-container_of/gep_nested_subobject_reference_no_diag.cpp index cac3d0a..6029389 100644 --- a/test/offset_of-container_of/gep_nested_subobject_reference_no_diag.cpp +++ b/test/offset_of-container_of/gep_nested_subobject_reference_no_diag.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct AnalysisConfig { bool quiet = false; diff --git a/test/offset_of-container_of/gep_positive_offset_wrong_base_warn.c b/test/offset_of-container_of/gep_positive_offset_wrong_base_warn.c index b6a4624..d8635b3 100644 --- a/test/offset_of-container_of/gep_positive_offset_wrong_base_warn.c +++ b/test/offset_of-container_of/gep_positive_offset_wrong_base_warn.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/offset_of-container_of/inttoptr_multipath_offset_mismatch_warn.c b/test/offset_of-container_of/inttoptr_multipath_offset_mismatch_warn.c index a961305..facd571 100644 --- a/test/offset_of-container_of/inttoptr_multipath_offset_mismatch_warn.c +++ b/test/offset_of-container_of/inttoptr_multipath_offset_mismatch_warn.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/offset_of-container_of/inttoptr_ptrtoint_wrong_offset_error.c b/test/offset_of-container_of/inttoptr_ptrtoint_wrong_offset_error.c index 2d25022..91c6ccb 100644 --- a/test/offset_of-container_of/inttoptr_ptrtoint_wrong_offset_error.c +++ b/test/offset_of-container_of/inttoptr_ptrtoint_wrong_offset_error.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/offset_of-container_of/inttoptr_rhs_sub_ignore.c b/test/offset_of-container_of/inttoptr_rhs_sub_ignore.c index 842dfdc..9e914e1 100644 --- a/test/offset_of-container_of/inttoptr_rhs_sub_ignore.c +++ b/test/offset_of-container_of/inttoptr_rhs_sub_ignore.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/offset_of-container_of/inttoptr_through_stack_slot_error.c b/test/offset_of-container_of/inttoptr_through_stack_slot_error.c index 45bc2e0..0b5bb9f 100644 --- a/test/offset_of-container_of/inttoptr_through_stack_slot_error.c +++ b/test/offset_of-container_of/inttoptr_through_stack_slot_error.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include #include diff --git a/test/offset_of-container_of/inttoptr_unused_reconstructed_ptr_no_diag.c b/test/offset_of-container_of/inttoptr_unused_reconstructed_ptr_no_diag.c index 37380ff..a8f97da 100644 --- a/test/offset_of-container_of/inttoptr_unused_reconstructed_ptr_no_diag.c +++ b/test/offset_of-container_of/inttoptr_unused_reconstructed_ptr_no_diag.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/pointer_reference-const_correctness/advanced-cases.c b/test/pointer_reference-const_correctness/advanced-cases.c index 8ab7712..09071ac 100644 --- a/test/pointer_reference-const_correctness/advanced-cases.c +++ b/test/pointer_reference-const_correctness/advanced-cases.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include #include diff --git a/test/pointer_reference-const_correctness/advanced-cases.cpp b/test/pointer_reference-const_correctness/advanced-cases.cpp index 036d8e7..43be7c2 100644 --- a/test/pointer_reference-const_correctness/advanced-cases.cpp +++ b/test/pointer_reference-const_correctness/advanced-cases.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include void consume_ref(const int& v) diff --git a/test/pointer_reference-const_correctness/const-mixed.c b/test/pointer_reference-const_correctness/const-mixed.c index 6a9de57..bce2e8c 100644 --- a/test/pointer_reference-const_correctness/const-mixed.c +++ b/test/pointer_reference-const_correctness/const-mixed.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include #include diff --git a/test/pointer_reference-const_correctness/const-readonly.c b/test/pointer_reference-const_correctness/const-readonly.c index 532fbd9..91f0916 100644 --- a/test/pointer_reference-const_correctness/const-readonly.c +++ b/test/pointer_reference-const_correctness/const-readonly.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/pointer_reference-const_correctness/destructor-this-const-suppressed.cpp b/test/pointer_reference-const_correctness/destructor-this-const-suppressed.cpp index 0d4bf9b..9ba6695 100644 --- a/test/pointer_reference-const_correctness/destructor-this-const-suppressed.cpp +++ b/test/pointer_reference-const_correctness/destructor-this-const-suppressed.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct Base { virtual ~Base() = default; diff --git a/test/pointer_reference-const_correctness/readonly-pointer.c b/test/pointer_reference-const_correctness/readonly-pointer.c index e602bc3..b1cc6da 100644 --- a/test/pointer_reference-const_correctness/readonly-pointer.c +++ b/test/pointer_reference-const_correctness/readonly-pointer.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include // at line 13, column 0 diff --git a/test/pointer_reference-const_correctness/readonly-reference.cpp b/test/pointer_reference-const_correctness/readonly-reference.cpp index 17a346f..74929d8 100644 --- a/test/pointer_reference-const_correctness/readonly-reference.cpp +++ b/test/pointer_reference-const_correctness/readonly-reference.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // at line 5, column 0 // [ !Info! ] ConstParameterNotModified.Reference: parameter 'inc' in function 'increment(int&, int&)' is never used to modify the referred object // ↳ current type: int &inc diff --git a/test/recursion/c/infinite-recursion.c b/test/recursion/c/infinite-recursion.c index 0200db2..946bab3 100644 --- a/test/recursion/c/infinite-recursion.c +++ b/test/recursion/c/infinite-recursion.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include // at line 11, column 5 diff --git a/test/recursion/c/limited-recursion.c b/test/recursion/c/limited-recursion.c index 85ff7d2..0c75e44 100644 --- a/test/recursion/c/limited-recursion.c +++ b/test/recursion/c/limited-recursion.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include // at line 8, column 12 diff --git a/test/recursion/cpp/infinite-recursion-multiple-progration-limited.cpp b/test/recursion/cpp/infinite-recursion-multiple-progration-limited.cpp index c063957..b3dd6bf 100644 --- a/test/recursion/cpp/infinite-recursion-multiple-progration-limited.cpp +++ b/test/recursion/cpp/infinite-recursion-multiple-progration-limited.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include void tutu(); diff --git a/test/recursion/cpp/infinite-recursion-multiple-progration-limited2.cpp b/test/recursion/cpp/infinite-recursion-multiple-progration-limited2.cpp index 75587d1..6535c91 100644 --- a/test/recursion/cpp/infinite-recursion-multiple-progration-limited2.cpp +++ b/test/recursion/cpp/infinite-recursion-multiple-progration-limited2.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include void foo(); diff --git a/test/recursion/cpp/infinite-recursion-multiple-progration-limited3.cpp b/test/recursion/cpp/infinite-recursion-multiple-progration-limited3.cpp index 5d3796b..b8a7f74 100644 --- a/test/recursion/cpp/infinite-recursion-multiple-progration-limited3.cpp +++ b/test/recursion/cpp/infinite-recursion-multiple-progration-limited3.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include void foo(); diff --git a/test/recursion/cpp/infinite-recursion-multiple-progration.cpp b/test/recursion/cpp/infinite-recursion-multiple-progration.cpp index 0951202..35e27e2 100644 --- a/test/recursion/cpp/infinite-recursion-multiple-progration.cpp +++ b/test/recursion/cpp/infinite-recursion-multiple-progration.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include void tutu(); diff --git a/test/recursion/cpp/infinite-recursion-multiple-progration2.cpp b/test/recursion/cpp/infinite-recursion-multiple-progration2.cpp index 0c10f56..61ce09a 100644 --- a/test/recursion/cpp/infinite-recursion-multiple-progration2.cpp +++ b/test/recursion/cpp/infinite-recursion-multiple-progration2.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include void foo(); diff --git a/test/recursion/cpp/infinite-recursion.cpp b/test/recursion/cpp/infinite-recursion.cpp index 2623d30..70b74d5 100644 --- a/test/recursion/cpp/infinite-recursion.cpp +++ b/test/recursion/cpp/infinite-recursion.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include // at line 11, column 5 diff --git a/test/recursion/cpp/limited-recursion.cpp b/test/recursion/cpp/limited-recursion.cpp index ea26fff..11a939d 100644 --- a/test/recursion/cpp/limited-recursion.cpp +++ b/test/recursion/cpp/limited-recursion.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include // at line 9, column 12 diff --git a/test/resource-lifetime/acquire-returned-conditional-no-leak.c b/test/resource-lifetime/acquire-returned-conditional-no-leak.c index 98d1f66..ec9ec26 100644 --- a/test/resource-lifetime/acquire-returned-conditional-no-leak.c +++ b/test/resource-lifetime/acquire-returned-conditional-no-leak.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* handle_t; extern void acquire_handle(handle_t* out); diff --git a/test/resource-lifetime/acquire-returned-no-leak.c b/test/resource-lifetime/acquire-returned-no-leak.c index 548d93c..5df6710 100644 --- a/test/resource-lifetime/acquire-returned-no-leak.c +++ b/test/resource-lifetime/acquire-returned-no-leak.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* handle_t; extern void acquire_handle(handle_t* out); diff --git a/test/resource-lifetime/cross-tu-return-def.c b/test/resource-lifetime/cross-tu-return-def.c index f114f67..be9a1ee 100644 --- a/test/resource-lifetime/cross-tu-return-def.c +++ b/test/resource-lifetime/cross-tu-return-def.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include void* create_heap_cross_tu(void) diff --git a/test/resource-lifetime/cross-tu-return-use.c b/test/resource-lifetime/cross-tu-return-use.c index 6f19877..a793b2e 100644 --- a/test/resource-lifetime/cross-tu-return-use.c +++ b/test/resource-lifetime/cross-tu-return-use.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include extern void* create_heap_cross_tu(void); diff --git a/test/resource-lifetime/cross-tu-wrapper-def.c b/test/resource-lifetime/cross-tu-wrapper-def.c index 64a7ff3..20c76b0 100644 --- a/test/resource-lifetime/cross-tu-wrapper-def.c +++ b/test/resource-lifetime/cross-tu-wrapper-def.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* handle_t; typedef struct CreateProps diff --git a/test/resource-lifetime/cross-tu-wrapper-leak-use.c b/test/resource-lifetime/cross-tu-wrapper-leak-use.c index 510469a..6fcc537 100644 --- a/test/resource-lifetime/cross-tu-wrapper-leak-use.c +++ b/test/resource-lifetime/cross-tu-wrapper-leak-use.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* handle_t; typedef struct CreateProps diff --git a/test/resource-lifetime/cross-tu-wrapper-use.c b/test/resource-lifetime/cross-tu-wrapper-use.c index dfa557c..fd0e7a2 100644 --- a/test/resource-lifetime/cross-tu-wrapper-use.c +++ b/test/resource-lifetime/cross-tu-wrapper-use.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* handle_t; typedef struct CreateProps diff --git a/test/resource-lifetime/cxa-demangle-balanced-no-incomplete.cpp b/test/resource-lifetime/cxa-demangle-balanced-no-incomplete.cpp index 8455da1..75d9c64 100644 --- a/test/resource-lifetime/cxa-demangle-balanced-no-incomplete.cpp +++ b/test/resource-lifetime/cxa-demangle-balanced-no-incomplete.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 extern "C" char* __cxa_demangle(const char* mangled, char* outputBuffer, unsigned long* length, int* status); extern "C" void free(void*); diff --git a/test/resource-lifetime/external-wrapper-known-no-acquire-double-release.c b/test/resource-lifetime/external-wrapper-known-no-acquire-double-release.c index 3c31a88..076ce51 100644 --- a/test/resource-lifetime/external-wrapper-known-no-acquire-double-release.c +++ b/test/resource-lifetime/external-wrapper-known-no-acquire-double-release.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* handle_t; extern void release_handle(handle_t handle); diff --git a/test/resource-lifetime/external-wrapper-unknown-out-no-double-release.c b/test/resource-lifetime/external-wrapper-unknown-out-no-double-release.c index bda3c46..aec60fe 100644 --- a/test/resource-lifetime/external-wrapper-unknown-out-no-double-release.c +++ b/test/resource-lifetime/external-wrapper-unknown-out-no-double-release.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* handle_t; typedef struct CreateProps diff --git a/test/resource-lifetime/external-wrapper-unknown-ref-out-no-double-release.cpp b/test/resource-lifetime/external-wrapper-unknown-ref-out-no-double-release.cpp index 404e445..6cb0c05 100644 --- a/test/resource-lifetime/external-wrapper-unknown-ref-out-no-double-release.cpp +++ b/test/resource-lifetime/external-wrapper-unknown-ref-out-no-double-release.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 extern "C" void release_handle(void* handle); using handle_t = void*; diff --git a/test/resource-lifetime/interproc-wrapper-chain-balanced.c b/test/resource-lifetime/interproc-wrapper-chain-balanced.c index 44909fd..359adbb 100644 --- a/test/resource-lifetime/interproc-wrapper-chain-balanced.c +++ b/test/resource-lifetime/interproc-wrapper-chain-balanced.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* handle_t; extern void acquire_handle(handle_t* out); diff --git a/test/resource-lifetime/local-balanced-release.c b/test/resource-lifetime/local-balanced-release.c index f4eafa6..fe72def 100644 --- a/test/resource-lifetime/local-balanced-release.c +++ b/test/resource-lifetime/local-balanced-release.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* handle_t; extern void acquire_handle(handle_t* out); diff --git a/test/resource-lifetime/local-double-release.c b/test/resource-lifetime/local-double-release.c index c616c4b..23d2bc2 100644 --- a/test/resource-lifetime/local-double-release.c +++ b/test/resource-lifetime/local-double-release.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* handle_t; extern void acquire_handle(handle_t* out); diff --git a/test/resource-lifetime/local-missing-release.c b/test/resource-lifetime/local-missing-release.c index d72ec44..83dec74 100644 --- a/test/resource-lifetime/local-missing-release.c +++ b/test/resource-lifetime/local-missing-release.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* handle_t; extern void acquire_handle(handle_t* out); diff --git a/test/resource-lifetime/local-non-escaping-no-incomplete.cpp b/test/resource-lifetime/local-non-escaping-no-incomplete.cpp index 8032327..8d46014 100644 --- a/test/resource-lifetime/local-non-escaping-no-incomplete.cpp +++ b/test/resource-lifetime/local-non-escaping-no-incomplete.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* handle_t; extern handle_t acquire_handle(void); extern void release_handle(handle_t); diff --git a/test/resource-lifetime/malloc-balanced-release.c b/test/resource-lifetime/malloc-balanced-release.c index 39cb483..81172f4 100644 --- a/test/resource-lifetime/malloc-balanced-release.c +++ b/test/resource-lifetime/malloc-balanced-release.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include // resource-model: models/resource-lifetime/generic.txt diff --git a/test/resource-lifetime/malloc-double-free.c b/test/resource-lifetime/malloc-double-free.c index e716e41..d0d520c 100644 --- a/test/resource-lifetime/malloc-double-free.c +++ b/test/resource-lifetime/malloc-double-free.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include // resource-model: models/resource-lifetime/generic.txt diff --git a/test/resource-lifetime/malloc-missing-release.c b/test/resource-lifetime/malloc-missing-release.c index e0ffefd..85d380a 100644 --- a/test/resource-lifetime/malloc-missing-release.c +++ b/test/resource-lifetime/malloc-missing-release.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include // resource-model: models/resource-lifetime/generic.txt diff --git a/test/resource-lifetime/missing-destructor-release-cleanup-method.cpp b/test/resource-lifetime/missing-destructor-release-cleanup-method.cpp index 899aed2..1717195 100644 --- a/test/resource-lifetime/missing-destructor-release-cleanup-method.cpp +++ b/test/resource-lifetime/missing-destructor-release-cleanup-method.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 extern "C" void acquire_handle(void** out); extern "C" void release_handle(void* handle); diff --git a/test/resource-lifetime/missing-destructor-release-indirect-balanced.cpp b/test/resource-lifetime/missing-destructor-release-indirect-balanced.cpp index 37ba50a..e9816e1 100644 --- a/test/resource-lifetime/missing-destructor-release-indirect-balanced.cpp +++ b/test/resource-lifetime/missing-destructor-release-indirect-balanced.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 extern "C" void acquire_handle(void** out); extern "C" void release_handle(void* handle); diff --git a/test/resource-lifetime/missing-destructor-release-indirect.cpp b/test/resource-lifetime/missing-destructor-release-indirect.cpp index ce009dc..ffb7977 100644 --- a/test/resource-lifetime/missing-destructor-release-indirect.cpp +++ b/test/resource-lifetime/missing-destructor-release-indirect.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 extern "C" void acquire_handle(void** out); extern "C" void release_handle(void* handle); diff --git a/test/resource-lifetime/missing-destructor-release.cpp b/test/resource-lifetime/missing-destructor-release.cpp index 846c01e..02a4dd5 100644 --- a/test/resource-lifetime/missing-destructor-release.cpp +++ b/test/resource-lifetime/missing-destructor-release.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 extern "C" void acquire_handle(void** out); extern "C" void release_handle(void* handle); diff --git a/test/resource-lifetime/new-balanced-delete.cpp b/test/resource-lifetime/new-balanced-delete.cpp index 12ce76f..e6f9d44 100644 --- a/test/resource-lifetime/new-balanced-delete.cpp +++ b/test/resource-lifetime/new-balanced-delete.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // resource-model: models/resource-lifetime/generic.txt int new_balanced_delete() { diff --git a/test/resource-lifetime/new-double-delete.cpp b/test/resource-lifetime/new-double-delete.cpp index e087e18..ab75876 100644 --- a/test/resource-lifetime/new-double-delete.cpp +++ b/test/resource-lifetime/new-double-delete.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // resource-model: models/resource-lifetime/generic.txt int new_double_delete() { diff --git a/test/resource-lifetime/new-missing-delete.cpp b/test/resource-lifetime/new-missing-delete.cpp index 81c0131..bb90c7b 100644 --- a/test/resource-lifetime/new-missing-delete.cpp +++ b/test/resource-lifetime/new-missing-delete.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 // resource-model: models/resource-lifetime/generic.txt int new_missing_delete() { diff --git a/test/resource-lifetime/nocapture-local-handle-no-incomplete.cpp b/test/resource-lifetime/nocapture-local-handle-no-incomplete.cpp index 5c17d22..3275f7a 100644 --- a/test/resource-lifetime/nocapture-local-handle-no-incomplete.cpp +++ b/test/resource-lifetime/nocapture-local-handle-no-incomplete.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* handle_t; extern handle_t acquire_handle(void); extern void release_handle(handle_t); diff --git a/test/resource-lifetime/range-for-thisfield-no-incomplete.cpp b/test/resource-lifetime/range-for-thisfield-no-incomplete.cpp index d4d5e12..be1b642 100644 --- a/test/resource-lifetime/range-for-thisfield-no-incomplete.cpp +++ b/test/resource-lifetime/range-for-thisfield-no-incomplete.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include typedef struct VkDevice_T* VkDevice; diff --git a/test/resource-lifetime/release-param-forward-no-double-release.c b/test/resource-lifetime/release-param-forward-no-double-release.c index 4b98041..56f756c 100644 --- a/test/resource-lifetime/release-param-forward-no-double-release.c +++ b/test/resource-lifetime/release-param-forward-no-double-release.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* handle_t; extern void release_handle(handle_t handle); diff --git a/test/resource-lifetime/release-without-acquire-still-errors.cpp b/test/resource-lifetime/release-without-acquire-still-errors.cpp index d3070db..6576689 100644 --- a/test/resource-lifetime/release-without-acquire-still-errors.cpp +++ b/test/resource-lifetime/release-without-acquire-still-errors.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef struct VkDevice_T* VkDevice; typedef struct VkBuffer_T* VkBuffer; diff --git a/test/resource-lifetime/stdlib-mangled-summary-no-incomplete.c b/test/resource-lifetime/stdlib-mangled-summary-no-incomplete.c index 5c113e6..fc29711 100644 --- a/test/resource-lifetime/stdlib-mangled-summary-no-incomplete.c +++ b/test/resource-lifetime/stdlib-mangled-summary-no-incomplete.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef void* GenericHandle; extern void release_handle(GenericHandle); diff --git a/test/resource-lifetime/summary-release-aggregate-field-no-incomplete.cpp b/test/resource-lifetime/summary-release-aggregate-field-no-incomplete.cpp index d42d5a0..c2c17fe 100644 --- a/test/resource-lifetime/summary-release-aggregate-field-no-incomplete.cpp +++ b/test/resource-lifetime/summary-release-aggregate-field-no-incomplete.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 extern "C" void* malloc(unsigned long); extern "C" void free(void*); diff --git a/test/resource-lifetime/summary-release-aggregate-local-no-incomplete.cpp b/test/resource-lifetime/summary-release-aggregate-local-no-incomplete.cpp index 154ccf3..ac6db3c 100644 --- a/test/resource-lifetime/summary-release-aggregate-local-no-incomplete.cpp +++ b/test/resource-lifetime/summary-release-aggregate-local-no-incomplete.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 extern "C" void free(void*); struct Holder diff --git a/test/script/linux_compile.sh b/test/script/linux_compile.sh index ac0e490..7176528 100644 --- a/test/script/linux_compile.sh +++ b/test/script/linux_compile.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash +# SPDX-License-Identifier: Apache-2.0 set -euo pipefail ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" diff --git a/test/security/buffer-overflow/01_buffer_overflow.c b/test/security/buffer-overflow/01_buffer_overflow.c index 9f7cb75..3b608ad 100644 --- a/test/security/buffer-overflow/01_buffer_overflow.c +++ b/test/security/buffer-overflow/01_buffer_overflow.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 01 - BUFFER OVERFLOWS (CWE-120, CWE-121, CWE-122, CWE-193) * diff --git a/test/security/command-injection/08_command_injection.c b/test/security/command-injection/08_command_injection.c index aa922d3..eb60c4e 100644 --- a/test/security/command-injection/08_command_injection.c +++ b/test/security/command-injection/08_command_injection.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 08 - COMMAND INJECTION (CWE-78) * diff --git a/test/security/format-string/02_format_string.c b/test/security/format-string/02_format_string.c index cb5ca50..acff520 100644 --- a/test/security/format-string/02_format_string.c +++ b/test/security/format-string/02_format_string.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 02 - FORMAT STRING (CWE-134) * diff --git a/test/security/integer-overflow/04_integer_overflow.c b/test/security/integer-overflow/04_integer_overflow.c index dcb1c1a..e8845ac 100644 --- a/test/security/integer-overflow/04_integer_overflow.c +++ b/test/security/integer-overflow/04_integer_overflow.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 04 - INTEGER OVERFLOW / UNDERFLOW (CWE-190, CWE-191, CWE-195, CWE-197) * diff --git a/test/security/integer-overflow/17_integer_overflow_advanced.c b/test/security/integer-overflow/17_integer_overflow_advanced.c index 955dfc1..99cd96c 100644 --- a/test/security/integer-overflow/17_integer_overflow_advanced.c +++ b/test/security/integer-overflow/17_integer_overflow_advanced.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 17 - ADVANCED INTEGER OVERFLOW CASES (nested/if/loop/tricky) */ diff --git a/test/security/memory-leak/09_memory_leak.c b/test/security/memory-leak/09_memory_leak.c index 81b37fc..77027a2 100644 --- a/test/security/memory-leak/09_memory_leak.c +++ b/test/security/memory-leak/09_memory_leak.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 09 - MEMORY LEAKS (CWE-401) * diff --git a/test/security/null-dereference/05_null_deref.c b/test/security/null-dereference/05_null_deref.c index 05cfa48..cde098f 100644 --- a/test/security/null-dereference/05_null_deref.c +++ b/test/security/null-dereference/05_null_deref.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 05 - NULL POINTER DEREFERENCE (CWE-476) * diff --git a/test/security/null-dereference/16_null_deref_nested.c b/test/security/null-dereference/16_null_deref_nested.c index f81050a..6cda432 100644 --- a/test/security/null-dereference/16_null_deref_nested.c +++ b/test/security/null-dereference/16_null_deref_nested.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 16 - NULL DEREF IN NESTED CONTROL FLOW (CWE-476) * diff --git a/test/security/oob-read/12_oob_read.c b/test/security/oob-read/12_oob_read.c index 8a4e338..a06e489 100644 --- a/test/security/oob-read/12_oob_read.c +++ b/test/security/oob-read/12_oob_read.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 12 - OUT-OF-BOUNDS READ (CWE-125) * diff --git a/test/security/sizeof-pitfall/15_sizeof_pitfall.c b/test/security/sizeof-pitfall/15_sizeof_pitfall.c index 1fc0962..d9ab28b 100644 --- a/test/security/sizeof-pitfall/15_sizeof_pitfall.c +++ b/test/security/sizeof-pitfall/15_sizeof_pitfall.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 15 - SIZEOF PITFALLS (CWE-467) * diff --git a/test/security/stack-escape/11_return_local.c b/test/security/stack-escape/11_return_local.c index aa538c9..c05d864 100644 --- a/test/security/stack-escape/11_return_local.c +++ b/test/security/stack-escape/11_return_local.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 11 - RETURN POINTER TO LOCAL (CWE-562) * diff --git a/test/security/toctou/07_toctou.c b/test/security/toctou/07_toctou.c index b9dea16..087a1e5 100644 --- a/test/security/toctou/07_toctou.c +++ b/test/security/toctou/07_toctou.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 07 - RACE CONDITION / TOCTOU (CWE-367) * diff --git a/test/security/type-confusion/10_type_confusion.c b/test/security/type-confusion/10_type_confusion.c index 092a2c5..77397b4 100644 --- a/test/security/type-confusion/10_type_confusion.c +++ b/test/security/type-confusion/10_type_confusion.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 10 - TYPE CONFUSION / MAUVAIS CAST (CWE-843) * diff --git a/test/security/uninitialized/06_uninitialized.c b/test/security/uninitialized/06_uninitialized.c index a37c16a..d937a84 100644 --- a/test/security/uninitialized/06_uninitialized.c +++ b/test/security/uninitialized/06_uninitialized.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 06 - UNINITIALIZED MEMORY (CWE-457, CWE-908, CWE-200) * diff --git a/test/security/unsafe-functions/13_unsafe_functions.c b/test/security/unsafe-functions/13_unsafe_functions.c index e0a7c76..e0e5450 100644 --- a/test/security/unsafe-functions/13_unsafe_functions.c +++ b/test/security/unsafe-functions/13_unsafe_functions.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 13 - UNSAFE / DEPRECATED FUNCTIONS (CWE-676) * diff --git a/test/security/use-after-free/03_use_after_free.c b/test/security/use-after-free/03_use_after_free.c index f76de9b..ec84091 100644 --- a/test/security/use-after-free/03_use_after_free.c +++ b/test/security/use-after-free/03_use_after_free.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 03 - USE-AFTER-FREE / DOUBLE FREE (CWE-415, CWE-416) * diff --git a/test/security/use-after-free/18_use_after_free_advanced.c b/test/security/use-after-free/18_use_after_free_advanced.c index 94f618c..6785635 100644 --- a/test/security/use-after-free/18_use_after_free_advanced.c +++ b/test/security/use-after-free/18_use_after_free_advanced.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 18 - ADVANCED USE-AFTER-FREE / DOUBLE FREE CASES (nested if/loop/tricky) * diff --git a/test/security/variadic-mismatch/14_variadic_mismatch.c b/test/security/variadic-mismatch/14_variadic_mismatch.c index e61d4f4..30f5bc0 100644 --- a/test/security/variadic-mismatch/14_variadic_mismatch.c +++ b/test/security/variadic-mismatch/14_variadic_mismatch.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 /** * 14 - VARIADIC FUNCTION MISUSE (format/argument mismatch) * diff --git a/test/size-arg/strncpy-size-minus-1.c b/test/size-arg/strncpy-size-minus-1.c index 733aa40..b244d45 100644 --- a/test/size-arg/strncpy-size-minus-1.c +++ b/test/size-arg/strncpy-size-minus-1.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/size-arg/wrapper-size-minus-1.c b/test/size-arg/wrapper-size-minus-1.c index 24af901..fb64d40 100644 --- a/test/size-arg/wrapper-size-minus-1.c +++ b/test/size-arg/wrapper-size-minus-1.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/test-multi-tu/entry.c b/test/test-multi-tu/entry.c index 28a8ec2..cb36a96 100644 --- a/test/test-multi-tu/entry.c +++ b/test/test-multi-tu/entry.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "mtu_api.h" int mtu_entry(void) diff --git a/test/test-multi-tu/mtu_api.h b/test/test-multi-tu/mtu_api.h index 330f163..5393132 100644 --- a/test/test-multi-tu/mtu_api.h +++ b/test/test-multi-tu/mtu_api.h @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #pragma once int mtu_worker(int x); diff --git a/test/test-multi-tu/worker.c b/test/test-multi-tu/worker.c index 604e3eb..12468d1 100644 --- a/test/test-multi-tu/worker.c +++ b/test/test-multi-tu/worker.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "mtu_api.h" int mtu_worker(int x) diff --git a/test/test.cc b/test/test.cc index a03f8ff..0a1c988 100644 --- a/test/test.cc +++ b/test/test.cc @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include void toto(void) diff --git a/test/test.cpp b/test/test.cpp index 0da6796..931d82b 100644 --- a/test/test.cpp +++ b/test/test.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/uninitialized-variable/cross-tu-uninitialized-sret-status-def.cpp b/test/uninitialized-variable/cross-tu-uninitialized-sret-status-def.cpp index 6bc0e5f..c6755af 100644 --- a/test/uninitialized-variable/cross-tu-uninitialized-sret-status-def.cpp +++ b/test/uninitialized-variable/cross-tu-uninitialized-sret-status-def.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include struct SupportStatusOut diff --git a/test/uninitialized-variable/cross-tu-uninitialized-sret-status-use.cpp b/test/uninitialized-variable/cross-tu-uninitialized-sret-status-use.cpp index 7606a69..44abdb2 100644 --- a/test/uninitialized-variable/cross-tu-uninitialized-sret-status-use.cpp +++ b/test/uninitialized-variable/cross-tu-uninitialized-sret-status-use.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include struct SupportStatusOut diff --git a/test/uninitialized-variable/cross-tu-uninitialized-wrapper-def.c b/test/uninitialized-variable/cross-tu-uninitialized-wrapper-def.c index d193df5..3885cf0 100644 --- a/test/uninitialized-variable/cross-tu-uninitialized-wrapper-def.c +++ b/test/uninitialized-variable/cross-tu-uninitialized-wrapper-def.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef struct IntOutProps { int* out; diff --git a/test/uninitialized-variable/cross-tu-uninitialized-wrapper-use.c b/test/uninitialized-variable/cross-tu-uninitialized-wrapper-use.c index 7b8d77b..7ace0cc 100644 --- a/test/uninitialized-variable/cross-tu-uninitialized-wrapper-use.c +++ b/test/uninitialized-variable/cross-tu-uninitialized-wrapper-use.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef struct IntOutProps { int* out; diff --git a/test/uninitialized-variable/global-array-read-before-write.c b/test/uninitialized-variable/global-array-read-before-write.c index 779d0e8..3976740 100644 --- a/test/uninitialized-variable/global-array-read-before-write.c +++ b/test/uninitialized-variable/global-array-read-before-write.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int g_zero[8]; diff --git a/test/uninitialized-variable/global-array-read-without-local-write.c b/test/uninitialized-variable/global-array-read-without-local-write.c index e672503..f7ee498 100644 --- a/test/uninitialized-variable/global-array-read-without-local-write.c +++ b/test/uninitialized-variable/global-array-read-without-local-write.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int g_zero_cross_state[8]; diff --git a/test/uninitialized-variable/uninitialized-local-argument-never-used.c b/test/uninitialized-variable/uninitialized-local-argument-never-used.c index c449386..87c54ea 100644 --- a/test/uninitialized-variable/uninitialized-local-argument-never-used.c +++ b/test/uninitialized-variable/uninitialized-local-argument-never-used.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int main(int argc, char** argv) diff --git a/test/uninitialized-variable/uninitialized-local-argument.c b/test/uninitialized-variable/uninitialized-local-argument.c index 15ed484..907901a 100644 --- a/test/uninitialized-variable/uninitialized-local-argument.c +++ b/test/uninitialized-variable/uninitialized-local-argument.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int main(int argc, char** argv) diff --git a/test/uninitialized-variable/uninitialized-local-argument.cpp b/test/uninitialized-variable/uninitialized-local-argument.cpp index d3f5081..dca01bd 100644 --- a/test/uninitialized-variable/uninitialized-local-argument.cpp +++ b/test/uninitialized-variable/uninitialized-local-argument.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include #include diff --git a/test/uninitialized-variable/uninitialized-local-array-fully-initialized.c b/test/uninitialized-variable/uninitialized-local-array-fully-initialized.c index 41128f1..2343ba9 100644 --- a/test/uninitialized-variable/uninitialized-local-array-fully-initialized.c +++ b/test/uninitialized-variable/uninitialized-local-array-fully-initialized.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int read_array_fully_initialized(void) { int arr[2]; diff --git a/test/uninitialized-variable/uninitialized-local-array-partial.c b/test/uninitialized-variable/uninitialized-local-array-partial.c index d649f7e..a08f053 100644 --- a/test/uninitialized-variable/uninitialized-local-array-partial.c +++ b/test/uninitialized-variable/uninitialized-local-array-partial.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int read_array_partial(void) { int arr[2]; diff --git a/test/uninitialized-variable/uninitialized-local-array.c b/test/uninitialized-variable/uninitialized-local-array.c index 7473949..313828e 100644 --- a/test/uninitialized-variable/uninitialized-local-array.c +++ b/test/uninitialized-variable/uninitialized-local-array.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int read_array_elem(void) { int arr[4]; diff --git a/test/uninitialized-variable/uninitialized-local-basic.c b/test/uninitialized-variable/uninitialized-local-basic.c index da50542..167c1c1 100644 --- a/test/uninitialized-variable/uninitialized-local-basic.c +++ b/test/uninitialized-variable/uninitialized-local-basic.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int read_uninitialized_basic(void) { int value; diff --git a/test/uninitialized-variable/uninitialized-local-brace-init.cpp b/test/uninitialized-variable/uninitialized-local-brace-init.cpp index 383a5c5..4828fb5 100644 --- a/test/uninitialized-variable/uninitialized-local-brace-init.cpp +++ b/test/uninitialized-variable/uninitialized-local-brace-init.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct Pair { int x; diff --git a/test/uninitialized-variable/uninitialized-local-branch.c b/test/uninitialized-variable/uninitialized-local-branch.c index a0b74b7..542bd9a 100644 --- a/test/uninitialized-variable/uninitialized-local-branch.c +++ b/test/uninitialized-variable/uninitialized-local-branch.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int read_uninitialized_branch(int cond) { int x; diff --git a/test/uninitialized-variable/uninitialized-local-cpp-aggregate-ctor-copy.cpp b/test/uninitialized-variable/uninitialized-local-cpp-aggregate-ctor-copy.cpp index b2cfd7c..4eb73c7 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-aggregate-ctor-copy.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-aggregate-ctor-copy.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/uninitialized-variable/uninitialized-local-cpp-bitfield-copy-ctor.cpp b/test/uninitialized-variable/uninitialized-local-cpp-bitfield-copy-ctor.cpp index 82e69d5..d8d16c7 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-bitfield-copy-ctor.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-bitfield-copy-ctor.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct ResolvedLike { unsigned line = 0; diff --git a/test/uninitialized-variable/uninitialized-local-cpp-bitfield-default-member-init.cpp b/test/uninitialized-variable/uninitialized-local-cpp-bitfield-default-member-init.cpp index 0a33fc5..aec4f86 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-bitfield-default-member-init.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-bitfield-default-member-init.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct BitfieldConfig { unsigned mode : 3 = 0; diff --git a/test/uninitialized-variable/uninitialized-local-cpp-bitfield-missing-init.cpp b/test/uninitialized-variable/uninitialized-local-cpp-bitfield-missing-init.cpp index 2238553..a3224c8 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-bitfield-missing-init.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-bitfield-missing-init.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct RawBits { unsigned first : 1; diff --git a/test/uninitialized-variable/uninitialized-local-cpp-ctor-forgets-field-warns.cpp b/test/uninitialized-variable/uninitialized-local-cpp-ctor-forgets-field-warns.cpp index 06f3edd..84983c1 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-ctor-forgets-field-warns.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-ctor-forgets-field-warns.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct BadCtor { int initialized; diff --git a/test/uninitialized-variable/uninitialized-local-cpp-ctor-sret.cpp b/test/uninitialized-variable/uninitialized-local-cpp-ctor-sret.cpp index 0330b30..ba817a3 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-ctor-sret.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-ctor-sret.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int ctor_and_sret_should_not_warn(void) diff --git a/test/uninitialized-variable/uninitialized-local-cpp-default-member-return.cpp b/test/uninitialized-variable/uninitialized-local-cpp-default-member-return.cpp index 506cf88..e46d137 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-default-member-return.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-default-member-return.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/uninitialized-variable/uninitialized-local-cpp-empty-lambda-capture.cpp b/test/uninitialized-variable/uninitialized-local-cpp-empty-lambda-capture.cpp index f61e928..8292246 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-empty-lambda-capture.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-empty-lambda-capture.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 enum class MemKind { None, diff --git a/test/uninitialized-variable/uninitialized-local-cpp-lambda-receiver.cpp b/test/uninitialized-variable/uninitialized-local-cpp-lambda-receiver.cpp index 7e97f8e..c456dc1 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-lambda-receiver.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-lambda-receiver.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int lambda_receiver_object_should_not_warn_never_initialized(void) diff --git a/test/uninitialized-variable/uninitialized-local-cpp-nested-aggregate-copy.cpp b/test/uninitialized-variable/uninitialized-local-cpp-nested-aggregate-copy.cpp index 70b552d..44e328d 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-nested-aggregate-copy.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-nested-aggregate-copy.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/uninitialized-variable/uninitialized-local-cpp-optional-receiver-index.cpp b/test/uninitialized-variable/uninitialized-local-cpp-optional-receiver-index.cpp index 5239deb..35cb60c 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-optional-receiver-index.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-optional-receiver-index.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include static std::optional getMethodReceiverIdx(bool hasReceiver) diff --git a/test/uninitialized-variable/uninitialized-local-cpp-parameterized-ctor-copy.cpp b/test/uninitialized-variable/uninitialized-local-cpp-parameterized-ctor-copy.cpp index 4785f99..cbca941 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-parameterized-ctor-copy.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-parameterized-ctor-copy.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/uninitialized-variable/uninitialized-local-cpp-record-never-init.cpp b/test/uninitialized-variable/uninitialized-local-cpp-record-never-init.cpp index 2edf6e2..26f90d6 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-record-never-init.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-record-never-init.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct NonEmptyRecord { int value; diff --git a/test/uninitialized-variable/uninitialized-local-cpp-sret-complex-return.cpp b/test/uninitialized-variable/uninitialized-local-cpp-sret-complex-return.cpp index 7186e73..6df6ab2 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-sret-complex-return.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-sret-complex-return.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/uninitialized-variable/uninitialized-local-cpp-trivial-ctor.cpp b/test/uninitialized-variable/uninitialized-local-cpp-trivial-ctor.cpp index c747f40..7493bb4 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-trivial-ctor.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-trivial-ctor.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 class TrivialAnalyzerApp { public: diff --git a/test/uninitialized-variable/uninitialized-local-cpp-wrap-iter.cpp b/test/uninitialized-variable/uninitialized-local-cpp-wrap-iter.cpp index 5d5bf47..5506790 100644 --- a/test/uninitialized-variable/uninitialized-local-cpp-wrap-iter.cpp +++ b/test/uninitialized-variable/uninitialized-local-cpp-wrap-iter.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int wrap_iter_temps_should_not_warn(void) diff --git a/test/uninitialized-variable/uninitialized-local-default-member-init.cpp b/test/uninitialized-variable/uninitialized-local-default-member-init.cpp index ae8edea..6ceb98a 100644 --- a/test/uninitialized-variable/uninitialized-local-default-member-init.cpp +++ b/test/uninitialized-variable/uninitialized-local-default-member-init.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/uninitialized-variable/uninitialized-local-default-member-read.cpp b/test/uninitialized-variable/uninitialized-local-default-member-read.cpp index 28fa39a..ae19059 100644 --- a/test/uninitialized-variable/uninitialized-local-default-member-read.cpp +++ b/test/uninitialized-variable/uninitialized-local-default-member-read.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include struct ConfigWithDefaultMember diff --git a/test/uninitialized-variable/uninitialized-local-external-out-param-nonvoid-checked.c b/test/uninitialized-variable/uninitialized-local-external-out-param-nonvoid-checked.c index 90daab0..b5360a0 100644 --- a/test/uninitialized-variable/uninitialized-local-external-out-param-nonvoid-checked.c +++ b/test/uninitialized-variable/uninitialized-local-external-out-param-nonvoid-checked.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef struct Pair { int a; diff --git a/test/uninitialized-variable/uninitialized-local-external-out-param-nonvoid-unchecked.c b/test/uninitialized-variable/uninitialized-local-external-out-param-nonvoid-unchecked.c index 3a15647..ff56bbd 100644 --- a/test/uninitialized-variable/uninitialized-local-external-out-param-nonvoid-unchecked.c +++ b/test/uninitialized-variable/uninitialized-local-external-out-param-nonvoid-unchecked.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef struct Pair { int a; diff --git a/test/uninitialized-variable/uninitialized-local-external-out-param-via-struct-slot.c b/test/uninitialized-variable/uninitialized-local-external-out-param-via-struct-slot.c index 5206879..98b9ecb 100644 --- a/test/uninitialized-variable/uninitialized-local-external-out-param-via-struct-slot.c +++ b/test/uninitialized-variable/uninitialized-local-external-out-param-via-struct-slot.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef int Status; extern Status ext_status_fill(int* outValue); diff --git a/test/uninitialized-variable/uninitialized-local-external-out-param.c b/test/uninitialized-variable/uninitialized-local-external-out-param.c index d55f980..79b48f3 100644 --- a/test/uninitialized-variable/uninitialized-local-external-out-param.c +++ b/test/uninitialized-variable/uninitialized-local-external-out-param.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 typedef struct Pair { int a; diff --git a/test/uninitialized-variable/uninitialized-local-goto.c b/test/uninitialized-variable/uninitialized-local-goto.c index d2ae001..7baab11 100644 --- a/test/uninitialized-variable/uninitialized-local-goto.c +++ b/test/uninitialized-variable/uninitialized-local-goto.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int read_goto(int cond) { int value; diff --git a/test/uninitialized-variable/uninitialized-local-initialized.c b/test/uninitialized-variable/uninitialized-local-initialized.c index cef41fb..71f0346 100644 --- a/test/uninitialized-variable/uninitialized-local-initialized.c +++ b/test/uninitialized-variable/uninitialized-local-initialized.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int read_initialized_ok(int cond) { int x = 0; diff --git a/test/uninitialized-variable/uninitialized-local-interproc-read-before-write-chain.c b/test/uninitialized-variable/uninitialized-local-interproc-read-before-write-chain.c index 53fe2f0..667617a 100644 --- a/test/uninitialized-variable/uninitialized-local-interproc-read-before-write-chain.c +++ b/test/uninitialized-variable/uninitialized-local-interproc-read-before-write-chain.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 static int read_leaf(const int* p) { return *p; diff --git a/test/uninitialized-variable/uninitialized-local-interproc-read-before-write.c b/test/uninitialized-variable/uninitialized-local-interproc-read-before-write.c index a0e5cbf..40413be 100644 --- a/test/uninitialized-variable/uninitialized-local-interproc-read-before-write.c +++ b/test/uninitialized-variable/uninitialized-local-interproc-read-before-write.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 static int read_value(const int* p) { return *p; diff --git a/test/uninitialized-variable/uninitialized-local-interproc-struct-partial.c b/test/uninitialized-variable/uninitialized-local-interproc-struct-partial.c index f0264be..004786f 100644 --- a/test/uninitialized-variable/uninitialized-local-interproc-struct-partial.c +++ b/test/uninitialized-variable/uninitialized-local-interproc-struct-partial.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct Pair { int x; diff --git a/test/uninitialized-variable/uninitialized-local-interproc-struct-partial.cpp b/test/uninitialized-variable/uninitialized-local-interproc-struct-partial.cpp index ba9b648..886637a 100644 --- a/test/uninitialized-variable/uninitialized-local-interproc-struct-partial.cpp +++ b/test/uninitialized-variable/uninitialized-local-interproc-struct-partial.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include #include diff --git a/test/uninitialized-variable/uninitialized-local-interproc-write-chain.c b/test/uninitialized-variable/uninitialized-local-interproc-write-chain.c index e89be88..d132bcc 100644 --- a/test/uninitialized-variable/uninitialized-local-interproc-write-chain.c +++ b/test/uninitialized-variable/uninitialized-local-interproc-write-chain.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 static void init_leaf(int* p) { *p = 7; diff --git a/test/uninitialized-variable/uninitialized-local-interproc-write.c b/test/uninitialized-variable/uninitialized-local-interproc-write.c index 5ece5ae..a33178d 100644 --- a/test/uninitialized-variable/uninitialized-local-interproc-write.c +++ b/test/uninitialized-variable/uninitialized-local-interproc-write.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 static void init_value(int* p) { *p = 42; diff --git a/test/uninitialized-variable/uninitialized-local-memcpy-initialized.c b/test/uninitialized-variable/uninitialized-local-memcpy-initialized.c index dff7256..75aa4bb 100644 --- a/test/uninitialized-variable/uninitialized-local-memcpy-initialized.c +++ b/test/uninitialized-variable/uninitialized-local-memcpy-initialized.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int memcpy_reads_initialized_source(void) { int src = 7; diff --git a/test/uninitialized-variable/uninitialized-local-memcpy-read.c b/test/uninitialized-variable/uninitialized-local-memcpy-read.c index 34bc55e..a5ca6f9 100644 --- a/test/uninitialized-variable/uninitialized-local-memcpy-read.c +++ b/test/uninitialized-variable/uninitialized-local-memcpy-read.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int memcpy_reads_uninitialized_source(void) { int src; diff --git a/test/uninitialized-variable/uninitialized-local-nested-loops.c b/test/uninitialized-variable/uninitialized-local-nested-loops.c index 5c31f13..d04d3de 100644 --- a/test/uninitialized-variable/uninitialized-local-nested-loops.c +++ b/test/uninitialized-variable/uninitialized-local-nested-loops.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int read_nested_loops(int n, int m) { int value; diff --git a/test/uninitialized-variable/uninitialized-local-opaque-ctor.cpp b/test/uninitialized-variable/uninitialized-local-opaque-ctor.cpp index 6c4b36e..ebd0128 100644 --- a/test/uninitialized-variable/uninitialized-local-opaque-ctor.cpp +++ b/test/uninitialized-variable/uninitialized-local-opaque-ctor.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct OpaqueCtorType { int value; diff --git a/test/uninitialized-variable/uninitialized-local-pointer-redirect.c b/test/uninitialized-variable/uninitialized-local-pointer-redirect.c index 790f058..fc7d03c 100644 --- a/test/uninitialized-variable/uninitialized-local-pointer-redirect.c +++ b/test/uninitialized-variable/uninitialized-local-pointer-redirect.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 static void redirect_ptr(int** out, int* target) { *out = target; diff --git a/test/uninitialized-variable/uninitialized-local-pointer.c b/test/uninitialized-variable/uninitialized-local-pointer.c index 9d60099..0a1116f 100644 --- a/test/uninitialized-variable/uninitialized-local-pointer.c +++ b/test/uninitialized-variable/uninitialized-local-pointer.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int read_pointer_target(int cond) { int fallback = 0; diff --git a/test/uninitialized-variable/uninitialized-local-reference.cpp b/test/uninitialized-variable/uninitialized-local-reference.cpp index 6ec1a58..e6346f1 100644 --- a/test/uninitialized-variable/uninitialized-local-reference.cpp +++ b/test/uninitialized-variable/uninitialized-local-reference.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int read_cpp_ref(int cond, int& out) { int value; diff --git a/test/uninitialized-variable/uninitialized-local-stdint-type.cpp b/test/uninitialized-variable/uninitialized-local-stdint-type.cpp index cfd292f..5a49719 100644 --- a/test/uninitialized-variable/uninitialized-local-stdint-type.cpp +++ b/test/uninitialized-variable/uninitialized-local-stdint-type.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int main(void) diff --git a/test/uninitialized-variable/uninitialized-local-struct-fully-initialized.c b/test/uninitialized-variable/uninitialized-local-struct-fully-initialized.c index e6a4eea..dff395c 100644 --- a/test/uninitialized-variable/uninitialized-local-struct-fully-initialized.c +++ b/test/uninitialized-variable/uninitialized-local-struct-fully-initialized.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct Point { int x; diff --git a/test/uninitialized-variable/uninitialized-local-struct-partial.c b/test/uninitialized-variable/uninitialized-local-struct-partial.c index 31917a4..7d1e6f8 100644 --- a/test/uninitialized-variable/uninitialized-local-struct-partial.c +++ b/test/uninitialized-variable/uninitialized-local-struct-partial.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct Pair { int x; diff --git a/test/uninitialized-variable/uninitialized-local-struct.c b/test/uninitialized-variable/uninitialized-local-struct.c index a6ac671..54769fc 100644 --- a/test/uninitialized-variable/uninitialized-local-struct.c +++ b/test/uninitialized-variable/uninitialized-local-struct.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 struct Pair { int x; diff --git a/test/uninitialized-variable/uninitialized-local-switch.c b/test/uninitialized-variable/uninitialized-local-switch.c index 490df88..68f2ba3 100644 --- a/test/uninitialized-variable/uninitialized-local-switch.c +++ b/test/uninitialized-variable/uninitialized-local-switch.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int read_switch(int tag) { int value; diff --git a/test/uninitialized-variable/uninitialized-local-unused.c b/test/uninitialized-variable/uninitialized-local-unused.c index 9e4c8df..ffdea49 100644 --- a/test/uninitialized-variable/uninitialized-local-unused.c +++ b/test/uninitialized-variable/uninitialized-local-unused.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 int main(void) { int value; diff --git a/test/uninitialized-variable/uninitialized-local-warnings-only-function-filter.c b/test/uninitialized-variable/uninitialized-local-warnings-only-function-filter.c index 0b06ed1..3b5e9ad 100644 --- a/test/uninitialized-variable/uninitialized-local-warnings-only-function-filter.c +++ b/test/uninitialized-variable/uninitialized-local-warnings-only-function-filter.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 static int read_uninitialized_value(void) { int value; diff --git a/test/unit/analyzer_module_unit_tests.cpp b/test/unit/analyzer_module_unit_tests.cpp index 1e6c8c6..922f7d7 100644 --- a/test/unit/analyzer_module_unit_tests.cpp +++ b/test/unit/analyzer_module_unit_tests.cpp @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include "StackUsageAnalyzer.hpp" #include "analysis/InputPipeline.hpp" #include "analysis/Reachability.hpp" diff --git a/test/use-after-free/cross-tu-uaf-def.c b/test/use-after-free/cross-tu-uaf-def.c index 441c5af..b8a8634 100644 --- a/test/use-after-free/cross-tu-uaf-def.c +++ b/test/use-after-free/cross-tu-uaf-def.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include void* acquire_handle(void) diff --git a/test/use-after-free/cross-tu-uaf-use.c b/test/use-after-free/cross-tu-uaf-use.c index 09d3cc6..480866b 100644 --- a/test/use-after-free/cross-tu-uaf-use.c +++ b/test/use-after-free/cross-tu-uaf-use.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/vla/deguised-constant.c b/test/vla/deguised-constant.c index 43646aa..683d462 100644 --- a/test/vla/deguised-constant.c +++ b/test/vla/deguised-constant.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 void foo(void) { int n = 6; diff --git a/test/vla/vla-read.c b/test/vla/vla-read.c index a93ff92..8c973e8 100644 --- a/test/vla/vla-read.c +++ b/test/vla/vla-read.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include #include diff --git a/test/vla/vla-scanf.c b/test/vla/vla-scanf.c index b2c30ee..9e4816f 100644 --- a/test/vla/vla-scanf.c +++ b/test/vla/vla-scanf.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int main(void) diff --git a/test/vla/vla-unknown-stack.c b/test/vla/vla-unknown-stack.c index b535abe..01381af 100644 --- a/test/vla/vla-unknown-stack.c +++ b/test/vla/vla-unknown-stack.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: Apache-2.0 #include int consume(int n)