Compiler Testing with Relaxed Memory Models

被引:0
|
作者
Geeson, Luke [1 ]
Smith, Lee [2 ]
机构
[1] UCL, London, England
[2] Arm Ltd, Cambridge, England
基金
英国工程与自然科学研究理事会;
关键词
D.1.3 Concurrent Programming; B.1.2.b Formal models; B.1.4.b Languages and compilers; D.2.5.r Testing tools; OPTIMIZATIONS; CONSISTENCY; C-11;
D O I
10.1109/CGO57630.2024.10444836
中图分类号
TP3 [计算技术、计算机技术];
学科分类号
0812 ;
摘要
Finding bugs is key to the correctness of compilers in wide use today. If the behaviour of a compiled program, as allowed by its architecture memory model, is not a behaviour of the source program under its source model, then there is a bug. This holds for all programs, but we focus on concurrency bugs that occur only with two or more threads of execution. We focus on testing techniques that detect such bugs in C/C++ compilers. We seek a testing technique that automatically covers concurrency bugs up to fixed bounds on program sizes and that scales to find bugs in compiled programs with many lines of code. Otherwise, a testing technique can miss bugs. Unfortunately, the state-of-the-art techniques are yet to satisfy all of these properties. We present the Telechat compiler testing tool for concurrent programs. Telechat compiles a concurrent C/C++ program and compares source and compiled program behaviours using source and architecture memory models. We make three claims: Tel echat improves the state-of-the-art at finding bugs in code generation for multi-threaded execution, it is the first public description of a compiler testing tool for concurrency that is deployed in industry, and it is the first tool that takes a significant step towards the desired properties. We provide experimental evidence suggesting Telechat finds bugs missed by other state-of-the-art techniques, case studies indicating that Telechat satisfies the properties, and reports of our experience deploying Telechat in industry regression testing.
引用
收藏
页码:334 / 348
页数:15
相关论文
共 50 条
  • [21] Using Lamport clocks to reason about relaxed memory models
    Condon, AE
    Hill, MD
    Plakal, M
    Sorin, DJ
    FIFTH INTERNATIONAL SYMPOSIUM ON HIGH-PERFORMANCE COMPUTER ARCHITECTURE, PROCEEDINGS, 1999, : 270 - 278
  • [22] Interactive Debugging of Concurrent Programs under Relaxed Memory Models
    Verma, Aakanksha
    Kalita, Pankaj Kumar
    Pandey, Awanish
    Roy, Subhajit
    CGO'20: PROCEEDINGS OF THE18TH ACM/IEEE INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION, 2020, : 68 - 80
  • [23] Thread-Modular Static Analysis for Relaxed Memory Models
    Kusano, Markus
    Wang, Chao
    ESEC/FSE 2017: PROCEEDINGS OF THE 2017 11TH JOINT MEETING ON FOUNDATIONS OF SOFTWARE ENGINEERING, 2017, : 337 - 348
  • [24] Assertional Reasoning about Data Races in Relaxed Memory Models
    Sanders, Beverly A.
    Kim, KyungHee
    PPOPP'08: PROCEEDINGS OF THE 2008 ACM SIGPLAN SYMPOSIUM ON PRINCIPLES AND PRACTICE OF PARALLEL PROGRAMMING, 2008, : 267 - 268
  • [25] Sound and Complete Monitoring of Sequential Consistency for Relaxed Memory Models
    Burnim, Jabob
    Sen, Koushik
    Stergiou, Christos
    TOOLS AND ALGORITHMS FOR THE CONSTRUCTION AND ANALYSIS OF SYSTEMS, 2011, 6605 : 11 - 25
  • [26] A Survey of Compiler Testing
    Chen, Junjie
    Patra, Jibesh
    Pradel, Michael
    Xiong, Yingfei
    Zhang, Hongyu
    Hao, Dan
    Zhang, Lu
    ACM COMPUTING SURVEYS, 2020, 53 (01)
  • [27] Testing of an APL compiler
    Ching, Wai-Mee
    Katz, Alex
    APL Quote Quad, 1993, 24 (01) : 55 - 62
  • [28] Formal automatic verification of cache coherence in multiprocessors with relaxed memory models
    Pong, P
    Dubois, M
    IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, 2000, 11 (09) : 989 - 1006
  • [29] BiRD: Race Detection in Software Binaries under Relaxed Memory Models
    Jain, Ridhi
    Purandare, Rahul
    Sharma, Subodh
    ACM TRANSACTIONS ON SOFTWARE ENGINEERING AND METHODOLOGY, 2022, 31 (04)
  • [30] CheckFence: Checking consistency of concurrent data types on relaxed memory models
    Burckhardt, Sebastian
    Alur, Rajeev
    Martin, Milo M. K.
    ACM SIGPLAN NOTICES, 2007, 42 (06) : 12 - 21