Static Race Detection and Mutex Safety and Liveness for Go Programs (extended version)

04/27/2020
by   Julia Gabet, et al.
0

Go is a popular concurrent programming language thanks to its ability to efficiently combine concurrency and systems programming. In Go programs, a number of concurrency bugs can be caused by a mixture of data races and communication problems. In this paper, we develop a theory based on behavioural types to statically detect data races and deadlocks in Go programs. We first specify lock safety and liveness and data race properties over a Go program model, using the happens-before relation defined in the Go memory model. We represent these properties of programs in a μ-calculus model of types, and validate them using type-level model-checking. We then extend the framework to account for Go's channels, and implement a static verification tool which can detect concurrency errors. This is, to the best of our knowledge, the first static verification framework of this kind for the Go language, uniformly analysing concurrency errors caused by a mix of shared memory accesses and asynchronous message-passing communications.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
10/27/2016

Fencing off Go: Liveness and Safety for Channel-based Programming (extended version)

Go is a production-level statically typed programming language whose des...
research
05/28/2021

Gobra: Modular Specification and Verification of Go Programs (extended version)

Go is an increasingly-popular systems programming language targeting, es...
research
03/24/2022

Provable GPU Data-Races in Static Race Detection

We extend the theory behind the Faial tool-chain, which can soundly prov...
research
04/02/2022

A Study of Real-World Data Races in Golang

The concurrent programming literature is rich with tools and techniques ...
research
10/11/2021

Robust Safety for Move

A program that maintains key safety properties even when interacting wit...
research
09/08/2023

A Grounded Conceptual Model for Ownership Types in Rust

Programmers learning Rust struggle to understand ownership types, Rust's...
research
11/27/2012

On the Use of Underspecified Data-Type Semantics for Type Safety in Low-Level Code

In recent projects on operating-system verification, C and C++ data type...

Please sign up or login with your details

Forgot password? Click here to reset