一句话:提出流敏感并发指针分析 ConPTA,并据此实现缺陷预测工具 Eagle,通过主动重排指针流检测四类并发指针缺陷。
由于线程交错的不确定性,并发缺陷预测长期十分困难。近期出现若干可靠的缺陷检测方法,它们基于局部搜索:变异已观测轨迹的顺序,再判断变异后的顺序能否触发缺陷。但这些方法从未考虑重排指针的数据流,而这一点对检测复杂缺陷至关重要。为弥补该缺陷,本文提出流敏感的指向分析技术 ConPTA,在顺序变异过程中主动重排指针流;并基于 ConPTA 提出可靠的预测式缺陷检测方法 Eagle,用于预测空指针解引用(NPD)、未初始化指针使用(UPU)、释放后使用(UAF)与双重释放(DF)四类并发缺陷。通过主动重排指针流,Eagle 在变异时能探索更大的线程交错搜索空间,从而检测到更多并发缺陷。在 10 个真实多线程程序上的评估表明,Eagle 在有效性与效率上均显著优于 UFO、ConVul、ConVulPOE 与 Period 四种最先进的缺陷检测方法。
Due to the non-determinism of thread interleaving, predicting concurrency bugs has long been an extremely difficult task. Recently, several sound bug-detecting approaches were proposed. These approaches are based on local search, i.e., mutating the sequential order of the observed trace and predicting whether the mutated sequential order can trigger a bug. Surprisingly, during this process, they never consider reordering the data flow of the pointers, which can be the key point to detecting many complex bugs. To alleviate this weakness, we propose a new flow-sensitive point-to analysis technique ConPTA to help actively reorder the pointer flow during the sequential order mutation process. Based on ConPTA, we further propose a new sound predictive bug-detecting approach Eagle to predict four types of concurrency bugs. They are null pointer dereference (NPD), uninitialized pointer use (UPU), use after free (UAF), and double free (DF). By actively reordering the pointer flow, Eagle can explore a larger search space of the thread interleaving during the mutation and thus detect more concurrency bugs. Our evaluation of Eagle on 10 real-world multi-threaded programs shows that Eagle significantly outperforms four state-of-the-art bug-detecting approaches UFO, ConVul, ConVulPOE and Period in both effectiveness and efficiency.