29 March 2024 in ACM Transactions on Software Engineering and Methodology
Value-flow analysis is a fundamental technique in program analysis, benefiting various clients, such as memory corruption detection and taint analysis. However, existing efforts suffer from the low potential speedup that leads to a deficiency in scalability. In this work, we present a parallel algorithmOctopusto collect path conditions for realizable paths efficiently.Octopusbuilds on the realizability decomposition to collect the intraprocedural path conditions of different functions simultaneously on-demand and obtain realizable path conditions by concatenation, which achieves a high potential speedup in parallelization. We implementOctopusas a tool and evaluate it over 15 real-world programs. The experiment shows thatOctopussignificantly outperforms the state-of-the-art algorithms. Particularly, it detects NULL-pointer-dereference bugs for the projectllvmwith 6.3 MLoC within 6.9 minutes under the 40-thread setting. We also state and prove several theorems to demonstrate the soundness, completeness, and high potential speedup ofOctopus. Our empirical and theoretical results demonstrate the great potential ofOctopusin supporting various program analysis clients. The implementation has officially deployed at Ant Group, scaling the nightly code scan for massive FinTech applications.