Static Analysis for Data-race detection in Java - Ferreira, Jorge Lopes (2024)
Over a decade ago the architectural paradigm shifted from single-core to multi-core/multi- threaded CPUs. Since then programming in parallel became crucial for developing effi- cient and faster programs. With concurrent programming came the challenge of writing programs free of data races. There are mechanisms to control the concurrency by means of synchronizing the threads, but using them does not always guarantee a correct pro- gram. To overcome this issue, in this thesis we investigate and present how we can use static program analysis to detect data races in Java classes without any extra input from the programmer. We used static analysis in Java to perform points-to analysis to find the accesses that cause data races. We benchmarked our tool with some open source code examples and compared the results of our solution with an existing tool for static analysis. We found that, while our tool still needs more refinement and optimization, it can already detect most, if not all of the data races in Java classes.