5 research outputs found
Static Deadlock Detection for Rust Programs
Rust relies on its unique ownership mechanism to ensure thread and memory
safety. However, numerous potential security vulnerabilities persist in
practical applications. New language features in Rust pose new challenges for
vulnerability detection. This paper proposes a static deadlock detection method
tailored for Rust programs, aiming to identify various deadlock types,
including double lock, conflict lock, and deadlock associated with conditional
variables. With due consideration for Rust's ownership and lifetimes, we first
complete the pointer analysis. Then, based on the obtained points-to
information, we analyze dependencies among variables to identify potential
deadlocks. We develop a tool and conduct experiments based on the proposed
method. The experimental results demonstrate that our method outperforms
existing deadlock detection methods in precision
Sound Static Deadlock Analysis for C/Pthreads (Extended Version)
We present a static deadlock analysis approach for C/pthreads. The design of
our method has been guided by the requirement to analyse real-world code. Our
approach is sound (i.e., misses no deadlocks) for programs that have defined
behaviour according to the C standard, and precise enough to prove
deadlock-freedom for a large number of programs. The method consists of a
pipeline of several analyses that build on a new context- and thread-sensitive
abstract interpretation framework. We further present a lightweight dependency
analysis to identify statements relevant to deadlock analysis and thus speed up
the overall analysis. In our experimental evaluation, we succeeded to prove
deadlock-freedom for 262 programs from the Debian GNU/Linux distribution with
in total 2.6 MLOC in less than 11 hours
An Effective Dynamic Analysis for Detecting Generalized Deadlocks
We present an effective dynamic analysis for finding a broad class of deadlocks, including the well-studied lock-only deadlocks as well as the less-studied, but no less widespread or insidious, deadlocks involving condition variables. Our analysis consists of two stages. In the first stage, our analysis observes a multi-threaded program execution and generates a simple multi-threaded program, called a trace program, that only records operations observed during the execution that are deemed relevant to finding deadlocks. Such operations include lock acquire and release, wait and notify, thread start and join, and change of values of user-identified synchronization predicates associated with condition variables. In the second stage, our analysis uses an off-the-shelf model checker to explore all possible thread interleavings of the trace program and check if any of them deadlocks. A key advantage of our technique is that it discards most of the program logic which usually causes state-space explosion in model checking, and retains only the relevant synchronization logic in the trace program, which is sufficient for finding deadlocks. We have implemented our analysis for Java, and have applied it to twelve real-world multi-threaded Java programs. Our analysis is effective in practice, finding thirteen previously known as well as four new deadlocks