arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2105.13699cs.SE
收藏

通过动态快捷方式加速JavaScript静态分析(扩展版)

Accelerating JavaScript Static Analysis via Dynamic Shortcuts (Extended Version)

Joonyoung Park, Jihyeok Park, Dongjun Youn, Sukyoung Ryu

摘要:

JavaScript已成为Web开发、服务器端编程甚至物联网微控制器中使用最广泛的程序设计语言之一。然而,其极端的功能和动态特性降低了静态分析的性能和精度。此外,内置函数和宿主环境的多样性需要对其行为进行过多的手动建模。为了缓解这些问题,研究人员提出了各种方法来在JavaScript静态分析期间利用动态分析。然而,它们没有充分利用动态分析的高性能,并且常常牺牲静态分析的可靠性。在本文中,我们提出了动态快捷键,一种新的技术,灵活地切换之间的抽象和具体的执行在JavaScript静态分析在一个健全的方式。它可以通过使用高度优化的商业JavaScript引擎来显著提高分析性能和精度,并减少对不透明代码的建模工作。我们通过$\text{SAFE}_\textsf{DS}$来实现该技术,它是$\text{SAFE}$和Jalangi的扩展组合,分别是静态分析器和动态分析器。我们使用Lodash 4库的269个官方测试来评估$\text{SAFE}_\textsf{DS}$。实验结果表明,$\text{SAFE}_\textsf{DS}$比基线静态分析器快7.81倍,并且它提高了精度,对22个不透明函数平均减少了12.31%的失败断言。

英文摘要:

JavaScript has become one of the most widely used programming languages for web development, server-side programming, and even micro-controllers for IoT. However, its extremely functional and dynamic features degrade the performance and precision of static analysis. Moreover, the variety of built-in functions and host environments requires excessive manual modeling of their behaviors. To alleviate these problems, researchers have proposed various ways to leverage dynamic analysis during JavaScript static analysis. However, they do not fully utilize the high performance of dynamic analysis and often sacrifice the soundness of static analysis. In this paper, we present dynamic shortcuts, a new technique to flexibly switch between abstract and concrete execution during JavaScript static analysis in a sound way. It can significantly improve the analysis performance and precision by using highly-optimized commercial JavaScript engines and lessen the modeling efforts for opaque code. We actualize the technique via $\text{SAFE}_\textsf{DS}$, an extended combination of $\text{SAFE}$ and Jalangi, a static analyzer and a dynamic analyzer, respectively. We evaluated $\text{SAFE}_\textsf{DS}$ using 269 official tests of Lodash 4 library. Our experiment shows that $\text{SAFE}_\textsf{DS}$ is 7.81x faster than the baseline static analyzer, and it improves the precision to reduce failed assertions by 12.31% on average for 22 opaque functions.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑