Detecting threading-related errors in Java programs using AspectJ

Publication date

DOI

Document Type

Master Thesis

Collections

Open Access logo

License

CC-BY-NC-ND

Abstract

This paper discusses the implementation of a testing framework for detecting concurrency errors in existing Java programs. The instrumented program is modified by AspectJ, allowing the framework to detect concurrency errors at runtime. Data race detection is handled by a direct implementation of the Java Memory Model, keeping track of happens-before order through vector clocks. Further bytecode manipulation allows the framework to effectively control the thread scheduler. By using a deterministic scheduling algorithm, the sequence of thread scheduling decisions leading up to an error can be recreated at will.

Keywords

concurrency, java, aspectj, memory model

Citation