Scasa
# Scasa Scasa is a tool based on Clang Static Analyzer (CSA), and it can detecting Element Accessing bugs in C++ Sequence Containers (EASC bugs). # Scasa Setup and Usage Guide Prerequisites CMake (minimum version 3.13) A C++ compiler (e.g., GCC or Clang) tar utility # Setup Instructions First, extract the contents of the llvm-Scasa.tar.xz and llvm-Scasa2.tar.xz archives: tar -xf llvm-Scasa.tar.xz tar -xf llvm-Scasa2.tar.xz Move the clang, clang-tools-extra, and compiler-rt directories from llvm-Scasa2 to llvm-Scasa: mv llvm-Scasa2/clang llvm-Scasa/ mv llvm-Scasa2/clang-tools-extra llvm-Scasa/ mv llvm-Scasa2/compiler-rt llvm-Scasa/ Compile Clang-Check cd llvm-Scasa mkdir build cd build Run CMake to configure the project: cmake ../llvm -DCMAKE_BUILD_TYPE=release -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;compiler-rt" -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DLLVM_TARGETS_TO_BUILD=X86 -DBUILD_SHARED_LIBS=ON -DLLVM_OPTIMIZED_TABLEGEN=ON -DLLVM_ENABLE_Z3_SOLVER=ON -DLLVM_ENABLE_BINDINGS=OFF -DCLANG_ENABLE_ARCMT=OFF -G Ninja Compile the relevant tools: ninja clang-check; ninja clang-extdef-mapping; ninja scan-build; ninja clang Using Clang-Check After compilation, you can use the obtained clang-check as a regular clang-check. To check EASC bugs, enable the corresponding checkers with the -analyzer-checker=STL_seki option: ./bin/clang-check -analyze -extra-arg=-Xanalyzer -extra-arg=-analyzer-checker=STL_seki <source-file> Replace <source-file> with the path to the source file you want to analyze. # Notes Ensure that you have all the necessary dependencies installed before starting the setup process. If you encounter any issues during compilation, refer to the CMake and Clang documentation for troubleshooting.
Publication Details
- Journal
- Zenodo (CERN European Organization for Nuclear Research)
- Published
- 2024-08-20
- DOI
- https://doi.org/10.5281/zenodo.13346057
- Primary Topic
- Software System Performance and Reliability
- Type
- article
- Field-Weighted Citation Impact
- 0.00