|
Detection of erroneous usage of synchronization monitor in С# via static analysis
P. I. Ragozinaab, V. N. Ignatyevab a Ivannikov Institute for System Programming of the RAS
b Lomonosov Moscow State University
Abstract:
The paper describes static analysis algorithms aimed at finding three types of errors related to the concept of a synchronizing monitor: redefinition of a variable of mutually exclusive locking inside a critical section; use of an incorrect variable type when entering the monitor; blocking involving an object that has methods that use a reference to an instance (this) to lock. Developed algorithms rely on symbolic execution technology and involve interprocedural analysis via summary of functions, which ensures scalability, field-, context-, and flow-sensivity. Proposed methods were implemented in the infrastructure of a static analyzer in the form of three separate detectors. Testing on the set of open source projects revealed 23 errors and the true positive ratio of 88.5% was obtained, while the time consumption only made up from 0.1 to 0.7% of the total analysis time. The errors that these detectors were designed to find are difficult to detect by testing or dynamic analysis because of their multithreading nature. At the same time, it is necessary to find them: just one such defect can lead to incorrectness of the program and even make it vulnerable to intruders.
Keywords:
static analysis, software error detection, symbolic execution, C# language, synchronization errors, critical section, inter-procedural analysis
Citation:
P. I. Ragozina, V. N. Ignatyev, “Detection of erroneous usage of synchronization monitor in С# via static analysis”, Proceedings of ISP RAS, 34:4 (2022), 63–78
Linking options:
https://www.mathnet.ru/eng/tisp705 https://www.mathnet.ru/eng/tisp/v34/i4/p63
|
Statistics & downloads: |
Abstract page: | 33 | Full-text PDF : | 21 |
|