Leveraging Valgrind to Assess Concurrent, Testing-Unaware C Programs

Concurrent programming has allowed software to increase the power of CPUs, but is inherently error-prone because of its complexity and non-determinism. A low-level language such as C further increases the difficulty of writing concurrent programs Existing solutions for checking application-specific functional concurrency constraints do not support C and require the tested concurrent programs to be testing-aware by producing special log traces. We have developed a new framework, called Valgrind++, which uses Valgrind to instrument binary code to generate traces automatically. The framework provides (a) a mechanism to specify traced method calls, and (b) initial high-level and flexible abstractions to create tests that process the traces of these calls. These abstractions allow instructors to trade programming effort with testing accuracy based on their experience with the kind of mistakes students make and their ability to catch these mistakes manually. This paper describes Valgrind++ and how it can be used to make these tradeoffs. It presents complete tests for a series of related introductory examples for trace-based instruction on threads, context switching, locks, and conditions. It also describes a case study of a complex operating systems assignment for advanced students, which shows the potential of using Valgrind++ to save grading effort, catch manual grading errors, and provide direction to those struggling to meet the concurrency requirements.

Authors

Institutions

Publication Details

Published
2024-12-18
DOI
https://doi.org/10.1109/hipcw63042.2024.00013
Citations
1
Primary Topic
Parallel Computing and Optimization Techniques
Type
article
Field-Weighted Citation Impact
0.49
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Leveraging Valgrind to Assess Concurrent, Testing-Unaware C Programs

Prasun Dewan, Nalin Gaddis
1 citations
Parallel Computing and Optimization Techniques
0.49
article

Leveraging Valgrind to Assess Concurrent, Testing-Unaware C Programs

Prasun Dewan, Nalin Gaddis
article en
1 citations

Abstract

Concurrent programming has allowed software to increase the power of CPUs, but is inherently error-prone because of its complexity and non-determinism. A low-level language such as C further increases the difficulty of writing concurrent programs Existing solutions for checking application-specific functional concurrency constraints do not support C and require the tested concurrent programs to be testing-aware by producing special log traces. We have developed a new framework, called Valgrind++, which uses Valgrind to instrument binary code to generate traces automatically. The framework provides (a) a mechanism to specify traced method calls, and (b) initial high-level and flexible abstractions to create tests that process the traces of these calls. These abstractions allow instructors to trade programming effort with testing accuracy based on their experience with the kind of mistakes students make and their ability to catch these mistakes manually. This paper describes Valgrind++ and how it can be used to make these tradeoffs. It presents complete tests for a series of related introductory examples for trace-based instruction on threads, context switching, locks, and conditions. It also describes a case study of a complex operating systems assignment for advanced students, which shows the potential of using Valgrind++ to save grading effort, catch manual grading errors, and provide direction to those struggling to meet the concurrency requirements.

University of North Carolina at Chapel Hill (US)
Openalex Percentile: Top 31%
Parallel Computing and Optimization Techniques
0.49
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Leveraging Valgrind to Assess Concurrent, Testing-Unaware C Programs — Prasun Dewan, Nalin Gaddis · (2024) | TGRS Research Map | TGRS