Why it matters:Ī deadlock is typically an unrecoverable error. In other words, in this language, we can find all the deadlocks without false positives. In our paper, we also prove that our analysis is sound and complete for an abstract programming language that has only non-deterministic control. It is this heuristic that enables our analysis to scale. Then, based on that data, it applies a heuristic that locates methods outside the revision that could potentially deadlock with one of the methods in the revision. Instead, it first processes all methods in the revision’s modified files. To be fast and efficient, our tool avoids analyzing all source files in an app. This data, computed across all methods, is enough to let us answer the question of whether a deadlock is possible between two concurrent methods. ![]() A critical pair (A,B) records the following fact: The method tries to acquire lock B, and at that time, it’s already holding precisely locks in set A. ![]() The central part of the summary is the set of critical pairs of the method. This is done in a compositional manner: Each method is summarized once, at most, and its summary is used in the summarization of its callers, ensuring predictable high performance. For each method, the analyzer computes a summary of how the method behaves in terms of lock acquisition and release, as well as whether the method will run on the main thread or on a background thread. We used abstract interpretation techniques to design our analyzer. Our analyzer is open source and forms part of the Infer static analysis framework. In the last two years, developers have actioned over 200 fixes in response to deadlock reports, at a fix rate of around 54 percent. We have deployed our analyzer in Meta’s continuous integration system, where it scans every commit to the Android app family. ![]() What distinguishes our analyzer from past research is its ability to analyze revisions in codebases with hundreds of millions of lines of code. We’ve developed a new static analyzer that catches deadlocks in Java code for Android without ever running the code.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |