Implementing and Executing Static Analysis Using LLVM and CodeChecker

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Horvath, Gabor, Kovacs, Reka, Szalay, Richard, Porkolab, Zoltan
Format: Preprint
Veröffentlicht: 2024
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866916353029439488
author Horvath, Gabor
Kovacs, Reka
Szalay, Richard
Porkolab, Zoltan
author_facet Horvath, Gabor
Kovacs, Reka
Szalay, Richard
Porkolab, Zoltan
contents Static analysis is a method of analyzing source code without executing it. It is widely used to find bugs and code smells in industrial software. Besides other methods, the most important techniques are those based on the abstract syntax tree and those performing symbolic execution. Both of these methods found their role in modern software development as they have different advantages and limitations. In this tutorial, we present two problems from the C++ programming language: the elimination of redundant pointers, and the reporting of dangling pointers originating from incorrect use of the std::string class. These two issues have different theoretical backgrounds and finding them requires different implementation techniques. We will provide a step-by-step guide to implement the checkers (software to identify the aforementioned problems) - one based on the abstract syntax analysis method, the other exploring the possibilities of symbolic execution. The methods are explained in great detail and supported by code examples. The intended audience for this tutorial are both architects of static analysis tools and developers who want to understand the advantages and constraints of the different methods.
format Preprint
id arxiv_https___arxiv_org_abs_2408_05657
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle Implementing and Executing Static Analysis Using LLVM and CodeChecker
Horvath, Gabor
Kovacs, Reka
Szalay, Richard
Porkolab, Zoltan
Software Engineering
Static analysis is a method of analyzing source code without executing it. It is widely used to find bugs and code smells in industrial software. Besides other methods, the most important techniques are those based on the abstract syntax tree and those performing symbolic execution. Both of these methods found their role in modern software development as they have different advantages and limitations. In this tutorial, we present two problems from the C++ programming language: the elimination of redundant pointers, and the reporting of dangling pointers originating from incorrect use of the std::string class. These two issues have different theoretical backgrounds and finding them requires different implementation techniques. We will provide a step-by-step guide to implement the checkers (software to identify the aforementioned problems) - one based on the abstract syntax analysis method, the other exploring the possibilities of symbolic execution. The methods are explained in great detail and supported by code examples. The intended audience for this tutorial are both architects of static analysis tools and developers who want to understand the advantages and constraints of the different methods.
title Implementing and Executing Static Analysis Using LLVM and CodeChecker
topic Software Engineering
url https://arxiv.org/abs/2408.05657