2017 · 18 citations · 18 references
ComputingComputer EngineeringComputer ScienceCompilersFormal MethodsProgramming LanguagesConcurrency AnalysisConcurrent ModelingConcurrent ProgrammingMemory ModelingRace Condition VulnerabilitiesVirtual MemoryCompiler SupportConcurrency SemanticsData Race AnalysisData Race ConditionsData-race FreedomMemory Model SemanticsNon-atomic Memory ModelsTransformations
The LLVM compiler follows closely the concurrency model of C/C++ 2011, but with a crucial difference. While in C/C++ a data race between a non-atomic read and a write is declared to be undefined behavior, in LLVM such a race has defined behavior: the read returns the special `undef' value. This subtle difference in the semantics of racy programs has profound consequences on the set of allowed program transformations, but it has been not formally been studied before. This work closes this gap by providing a formal memory model for a substantial fragment of LLVM and showing that it is correct as a concurrency model for a compiler intermediate language: (1) it is stronger than the C/C++ model, (2) weaker than the known hardware models, and (3) supports the expected program transformations. In order to support LLVM's semantics for racy accesses, our formal model does not work on the level of single executions as the hardware and the C/C++ models do, but rather uses more elaborate structures called event structures.
18
Jade Alglave, Luc Maranget, Michael Tautschnig · ACM Transactions on Programming Languages and Systems · 2014 · 335 citations · Full text
Mark Batty, Scott Owens, Susmit Sarkar et al. · 2011 · 267 citations