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 条
  • [1] Hiding relaxed memory consistency with a compiler
    Lee, J
    Padua, DA
    IEEE TRANSACTIONS ON COMPUTERS, 2001, 50 (08) : 824 - 833
  • [2] CompCertTSO: A Verified Compiler for Relaxed-Memory Concurrency
    Sevcik, Jaroslav
    Vafeiadis, Viktor
    Nardelli, Francesco Zappa
    Jagannathan, Suresh
    Sewell, Peter
    JOURNAL OF THE ACM, 2013, 60 (03)
  • [3] A compiler for multiple memory models
    Midkiff, SP
    Lee, J
    Padua, DA
    CONCURRENCY AND COMPUTATION-PRACTICE & EXPERIENCE, 2004, 16 (2-3): : 197 - 220
  • [4] Software Transactional Memory on Relaxed Memory Models
    Guerraoui, Rachid
    Henzinger, Thomas A.
    Singh, Vasu
    COMPUTER AIDED VERIFICATION, PROCEEDINGS, 2009, 5643 : 321 - 336
  • [5] Dynamic Synthesis for Relaxed Memory Models
    Liu, Feng
    Nedev, Nayden
    Prisadnikov, Nedyalko
    Vechev, Martin
    Yahav, Eran
    ACM SIGPLAN NOTICES, 2012, 47 (06) : 429 - 439
  • [6] Predicate Abstraction for Relaxed Memory Models
    Dan, Andrei Marian
    Meshman, Yuri
    Vechev, Martin
    Yahav, Eran
    STATIC ANALYSIS, SAS 2013, 2013, 7935 : 84 - 104
  • [7] Verification of STM on relaxed memory models
    Guerraoui, Rachid
    Henzinger, Thomas A.
    Singh, Vasu
    FORMAL METHODS IN SYSTEM DESIGN, 2011, 39 (03) : 297 - 331
  • [8] Relaxed Memory Models: an Operational Approach
    Boudol, Gerard
    Petri, Gustavo
    ACM SIGPLAN NOTICES, 2009, 44 (01) : 392 - 403
  • [9] Verification of STM on relaxed memory models
    Rachid Guerraoui
    Thomas A. Henzinger
    Vasu Singh
    Formal Methods in System Design, 2011, 39 : 297 - 331
  • [10] The Pensieve Project: A compiler infrastructure for memory models
    Wong, CL
    Sura, Z
    Fang, X
    Midkiff, SP
    Lee, JJ
    Padua, D
    I-SPAN'02: INTERNATIONAL SYMPOSIUM ON PARALLEL ARCHITECTURES, ALGORITHMS AND NETWORKS, PROCEEDINGS, 2002, : 239 - 244