We present a novel scalable deadlock analyser L2D2 capable of handling C code with low-level unstructured lock manipulation. L2D2 runs along the call tree of a program, starting from its leaves, and analyses each function just once, without any knowledge of the call context. L2D2 builds function summaries recording information about locks that are assumed or known to be locked or unlocked at the entry, inside, and at the exit of functions, together with lock dependencies, and reports warnings about possible deadlocks when cycles in the lock dependencies are detected. We implemented L2D2 as a plugin of the Facebook/Meta Infer framework and report results of experiments on a large body of C as well as C++ code illustrating the effectiveness and efficiency of L2D2.
翻译:我们展示了一个新的可缩放的僵局分析器L2D2, 能够以低层次的无结构锁操纵处理 C 代码。 L2D2 运行在程序呼唤树上, 从树叶开始, 并且仅仅一次分析每个功能, 却对呼叫环境一无所知 。 L2D2 建立功能摘要, 记录在入口、 内部和功能退出时假定或已知被锁或打开的锁的信息, 以及锁定依赖关系, 并报告在发现锁定依赖关系周期时可能出现的僵局。 我们实施了 L2D2 作为Facebook/Meta Infer 框架的插件, 并报告了大型 C 的实验结果 以及显示 L2D 2 有效性和效率的 C++ 代码 。