Fuzz Testing the Compiled Code in R Packages

被引:0
|
作者
Kolla, Akhila Chowdary [1 ]
Groce, Alex [1 ]
Hocking, Toby Dylan [1 ]
机构
[1] No Arizona Univ, Flagstaff, AZ 86011 USA
关键词
fuzzing; R language; C plus plus libraries; automated test generation; statistical software; memory errors;
D O I
10.1109/ISSRE52982.2021.00040
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
R packages written in the widely used Rcpp framework are typically tested using expected input/output pairs that are manually coded by package developers. These manually written tests are validated under various CRAN checks, using both static and dynamic analysis. Such manually written tests allow for subtle bugs, since they do not anticipate all possible inputs and miss important code paths. Fuzzers pass random, unexpected, potentially invalid inputs to a function, in order to identify bugs missed by manually written tests. This paper presents RcppDeepState, an R package that uses the DeepState framework to provide automatic fuzzing and symbolic execution for R packages written using the Rcpp framework. Using RcppDeepState, a package developer can systematically fuzz test their Rcpp functions, without having to manually write any inputs nor expected outputs. Randomly generated inputs are passed to each Rcpp function, and Valgrind is used to check for various memory access violations and memory leaks. In our system, a test harness can be used to fuzz test an Rcpp function using different backend fuzzers including afl, libFuzzer, and HonggFuzz. For even more flexibility, R package developers can write their own random generation functions and assertions. We implemented random generation functions for 8 of the most common Rcpp data types, then used these functions to fuzz test 1,185 Rcpp packages. Valgrind reported issues for more than 2,000 functions (over nearly 500 packages) which were not detected using standard CRAN checks on manually specified test/example inputs. Developers confirmed for several of these issues that the problem was reproducible and represented missing or flawed code. These results suggest that RcppDeepState is useful for finding subtle flaws in Rcpp packages.
引用
收藏
页码:300 / 308
页数:9
相关论文
共 50 条
  • [31] ER-Fuzz Conditional Code Removed Fuzzing
    Song, Xiaobin
    Wu, Zehui
    Cao, Yan
    Wei, Qiang
    KSII TRANSACTIONS ON INTERNET AND INFORMATION SYSTEMS, 2019, 13 (07): : 3511 - 3532
  • [32] Using mathematics to improve Ada compiled code
    Maurer, Ward Douglas
    RELIABLE SOFTWARE TECHNOLOGIES - ADA - EUROPE 2006, PROCEEDINGS, 2006, 4006 : 191 - 202
  • [33] Fuzz testing in AWS Firecracker hypervisor
    Mocanu, George
    Carabas, Costin
    Tapus, Nicolae
    2021 20TH INTERNATIONAL SYMPOSIUM ON PARALLEL AND DISTRIBUTED COMPUTING (ISPDC), 2021, : 130 - 137
  • [34] Poster: Fuzz Testing of Quantum Program
    Wang, Jiyuan
    Ma, Fucheng
    Jiang, Yu
    2021 14TH IEEE CONFERENCE ON SOFTWARE TESTING, VERIFICATION AND VALIDATION (ICST 2021), 2021, : 466 - 469
  • [35] R-Fuzz at SBFT'2023
    Chen, Ju
    Song, Chengyu
    Yin, Heng
    2023 IEEE/ACM INTERNATIONAL WORKSHOP ON SEARCH-BASED AND FUZZ TESTING, SBFT, 2023, : 82 - 83
  • [36] Certification of compiled assembly code by invariant translation
    Rival X.
    International Journal on Software Tools for Technology Transfer, 2004, 6 (1) : 15 - 37
  • [37] Reuse of JIT compiled code in JavaScript engine
    KT Innotz, Donga Tower, 1321 Seocho-Dong, Seocho-Gu, Seoul 137-857, Korea, Republic of
    不详
    Proc ACM Symp Appl Computing, (1840-1842): : 1840 - 1842
  • [38] Reusing Just-in-Time Compiled Code
    Mehta, Meetesh Kalpesh
    Krynski, Sebastian
    Gualandi, Hugo Musso
    Thakur, Manas
    Vitek, Jan
    PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2023, 7 (OOPSLA): : 1176 - 1197
  • [39] COMPILED HARDWARE ACCELERATION OF MOLECULAR DYNAMICS CODE
    Villarreal, Jason
    Najjar, Walid A.
    2008 INTERNATIONAL CONFERENCE ON FIELD PROGRAMMABLE AND LOGIC APPLICATIONS, VOLS 1 AND 2, 2008, : 666 - 669
  • [40] Improving Security Testing with Usage-Based Fuzz Testing
    Schneider, Martin A.
    Herbold, Steffen
    Wendland, Marc-Florian
    Grabowski, Jens
    RISK ASSESSMENT AND RISK-DRIVEN TESTING, 2015, 9488 : 110 - 119