English

Automatic Detection, Validation and Repair of Race Conditions in Interrupt-Driven Embedded Software

Software Engineering 2023-05-30 v1

Abstract

Interrupt-driven programs are widely deployed in safety-critical embedded systems to perform hardware and resource dependent data operation tasks. The frequent use of interrupts in these systems can cause race conditions to occur due to interactions between application tasks and interrupt handlers (or two interrupt handlers). Numerous program analysis and testing techniques have been proposed to detect races in multithreaded programs. Little work, however, has addressed race condition problems related to hardware interrupts. In this paper, we present SDRacer, an automated framework that can detect, validate and repair race conditions in interrupt-driven embedded software. It uses a combination of static analysis and symbolic execution to generate input data for exercising the potential races. It then employs virtual platforms to dynamically validate these races by forcing the interrupts to occur at the potential racing points. Finally, it provides repair candidates to eliminate the detected races. We evaluate SDRacer on nine real-world embedded programs written in C language. The results show that SDRacer can precisely detect and successfully fix race conditions.

Keywords

Cite

@article{arxiv.2305.17869,
  title  = {Automatic Detection, Validation and Repair of Race Conditions in Interrupt-Driven Embedded Software},
  author = {Yu Wang and Fengjuan Gao and Linzhang Wang and Tingting Yu and Ke Wang and Jianhua Zhao and Xuandong Li},
  journal= {arXiv preprint arXiv:2305.17869},
  year   = {2023}
}

Comments

This is a draft version of the published paper. Ke Wang provides suggestions for improving the paper and README of the GitHub repo

R2 v1 2026-06-28T10:48:54.272Z