On the Naturalness of Fuzzer-Generated Code
On the Naturalness of Fuzzer-Generated Code
复制标题
关于模糊器生成代码的自然性
DOI:
10.1145/3524842.3527972
复制
发表时间:
2022
期刊:
影响因子:
--
通讯作者:
Hellendoorn, Vincent J.
中科院分区:
文献类型:
--
作者:
Kambhamettu, Rajeswari Hita;Billos, John;Oluwaseun-Apo, Tomi;Gafford, Benjamin;Padhye, Rohan;Hellendoorn, Vincent J.
Compiler fuzzing tools such as Csmith have uncovered many bugs in compilers by randomly sampling programs from a generative model. The success of these tools is often attributed to their ability to generate unexpected corner case inputs that developers tend to overlook during manual testing. At the same time, their chaotic nature makes fuzzer-generated test cases notoriously hard to interpret, which has lead to the creation of input simplification tools such as C-Reduce (for C compiler bugs). In until now unrelated work, researchers have also shown that human-written software tends to be rather repetitive and predictable to language models. Studies show that developers deliberately write more predictable code, whereas code with bugs is relatively unpredictable. In this study, we ask the natural questions of whether this high predictability property of code also, and perhaps counter-intuitively, applies to fuzzer-generated code. That is, we investigate whether fuzzer-generated compiler inputs are deemed unpredictable by a language model built on human-written code and surprisingly conclude that it is not. To the contrary, Csmith fuzzer-generated programs aremorepredictable on a per-token basis than human-written C programs. Furthermore, bug-triggering tended to be more predictable still than random inputs, and the C-Reduce minimization tool did not substantially increase this predictability. Rather, we find that bug-triggering inputs are unpredictable relative toCsmith's owngenerative model. This is encouraging; our results suggest promising research directions on incorporating predictability metrics in the fuzzing and reduction tools themselves.
DOI:
10.1145/3324884.3416622
发表时间:
2020
期刊:
2020 35th IEEE/ACM International Conference on Automated Software Engineering (ASE)
影响因子:
--
作者:
Devjeet Roy;Ziyi Zhang;Maggie Ma;Venera Arnaoudova;Annibale Panichella;Sebastiano Panichella;Danielle Gonzalez;Mehdi Mirakhorli
通讯作者:
Mehdi Mirakhorli