LOCKSMITH: Context-sensitive correlation analysis for race detection

被引:0
|
作者
Pratikakis, Polyvios [1 ]
Foster, Jeffrey S. [1 ]
Hicks, Michael [1 ]
机构
[1] Univ Maryland, College Pk, MD 20742 USA
关键词
context-sensitivity; correlation; race detection; type inference; multi-threaded programming; locksmith;
D O I
10.1145/1133255.1134019
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
One common technique for preventing data races in multi-threaded programs is to ensure that all accesses to shared locations are consistently protected by a lock. We present a tool called LOCKSMITH for detecting data races in C programs by looking for violations of this pattern. We call the relationship between locks and the locations they protect consistent correlation, and the core of our technique is a novel constraint-based analysis that infers consistent correlation context-sensitively, using the results to check that locations are properly guarded by locks. We present the core of our algorithm for a simple formal language. lambda(sic) which we have proven sound, and discuss how we scale it up to an algorithm that aims to be sound for all of C. We develop several techniques to improve the precision and performance of the analysis, including a sharing analysis for inferring thread locality; existential quantification for modeling locks in data structures; and heuristics for modeling unsafe features of C such as type casts. When applied to several benchmarks, including multi-threaded servers and Linux device drivers, LOCK-SMITH found several races while producing a modest number of false alarms.
引用
收藏
页码:320 / 331
页数:12
相关论文
共 50 条
  • [1] Context-Sensitive Data Race Detection for Concurrent Programs
    Zhang, Yang
    Liu, Huan
    Qiao, Liu
    [J]. IEEE ACCESS, 2021, 9 : 20861 - 20867
  • [2] CSOD: Context-Sensitive Overflow Detection
    Liu, Hongyu
    Silvestro, Sam
    Wang, Xiaoyin
    Duan, Lide
    Liu, Tongping
    [J]. PROCEEDINGS OF THE 2019 IEEE/ACM INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION (CGO '19), 2019, : 50 - 60
  • [3] Context-sensitive detection of local community structure
    L. Karl Branting
    [J]. Social Network Analysis and Mining, 2012, 2 (3) : 279 - 289
  • [4] Context-sensitive detection of local community structure
    Branting, L. Karl
    [J]. SOCIAL NETWORK ANALYSIS AND MINING, 2012, 2 (03) : 279 - 289
  • [5] Synthesis and Analysis of Context-Sensitive Languages
    Bravo Pariente, C. A.
    Lima, D. A. C.
    [J]. IEEE LATIN AMERICA TRANSACTIONS, 2016, 14 (03) : 1526 - 1531
  • [6] The growing context-sensitive languages are the acyclic context-sensitive languages
    Niemann, G
    Woinowski, JR
    [J]. DEVELOPMENTS IN LANGUAGE THEORY, 2002, 2295 : 197 - 205
  • [7] Incremental and Modular Context-sensitive Analysis
    Garcia-Contreras, Isabel
    Morales, Jose F.
    Hermenegildo, Manuel, V
    [J]. THEORY AND PRACTICE OF LOGIC PROGRAMMING, 2021, 21 (02) : 196 - 243
  • [8] Efficient Accurate Context-Sensitive Anomaly Detection
    李红娇
    李建华
    [J]. Journal of Shanghai Jiaotong University(Science), 2007, (05) : 639 - 644
  • [9] Exploring context-sensitive data flow analysis for early vulnerability detection
    Sampaio, Luciano
    Garcia, Alessandro
    [J]. JOURNAL OF SYSTEMS AND SOFTWARE, 2016, 113 : 337 - 361
  • [10] Context-sensitive synchronization-sensitive analysis is undecidable
    Ramalingam, G
    [J]. ACM TRANSACTIONS ON PROGRAMMING LANGUAGES AND SYSTEMS, 2000, 22 (02): : 416 - 430