White-box Compiler Fuzzing Empowered by Large Language Models

要約

プログラムの動作を偽るコンパイルミスは重大な結果を招く可能性があるため、コンパイラの正確性は非常に重要です。
文献では、ファジングはコンパイラの欠陥を明らかにするために広範囲に研究されています。
しかし、コンパイラのファジングは依然として課題です。既存の技術はブラック ボックスおよびグレー ボックスのファジングに焦点を当てており、コンパイラの内部動作を十分に理解せずにテストを生成します。
そのため、複雑な最適化条件を実行するプログラムの構築に失敗することがよくあります。
一方、従来のホワイトボックス手法は、コンパイラーの巨大なコードベースには計算的に適用できません。
最近の進歩により、大規模言語モデル (LLM) がコード生成/理解タスクに優れ、ブラック ボックス ファジングで最先端のパフォーマンスを達成したことが実証されています。
それにもかかわらず、LLM にコンパイラのソースコード情報を要求することは、コンパイラのテストにおいて依然として不足している研究の一部です。
この目的を達成するために、コンパイラの最適化をテストするためにソースコード情報を持つ LLM を使用する初のホワイトボックス コンパイラ ファザーである WhiteFox を提案します。
WhiteFox はデュアル モデル フレームワークを採用しています。(i) 分析 LLM は、低レベルの最適化ソース コードを検査し、最適化をトリガーできる高レベルのテスト プログラムの要件を生成します。
(ii) 世代 LLM は、要約された要件に基づいてテスト プログラムを作成します。
さらに、最適化をトリガーするテストをフィードバックとして使用して、オンザフライでのテスト生成をさらに強化します。
4 つの人気のあるコンパイラでの評価では、WhiteFox が複雑な条件を必要とする深い最適化を実行するための高品質のテストを生成でき、最先端のファザーよりも最大 80 個多い最適化を実行できることがわかりました。
現在までに、WhiteFox は合計 96 件のバグを発見しており、そのうち 80 件は未知であることが確認され、51 件はすでに修正されています。
WhiteFox は、コンパイラのテスト以外にも、他の複雑な現実世界のソフトウェア システム一般のホワイト ボックス ファジングにも適応できます。

要約(オリジナル)

Compiler correctness is crucial, as miscompilation falsifying the program behaviors can lead to serious consequences. In the literature, fuzzing has been extensively studied to uncover compiler defects. However, compiler fuzzing remains challenging: Existing arts focus on black- and grey-box fuzzing, which generates tests without sufficient understanding of internal compiler behaviors. As such, they often fail to construct programs to exercise conditions of intricate optimizations. Meanwhile, traditional white-box techniques are computationally inapplicable to the giant codebase of compilers. Recent advances demonstrate that Large Language Models (LLMs) excel in code generation/understanding tasks and have achieved state-of-the-art performance in black-box fuzzing. Nonetheless, prompting LLMs with compiler source-code information remains a missing piece of research in compiler testing. To this end, we propose WhiteFox, the first white-box compiler fuzzer using LLMs with source-code information to test compiler optimization. WhiteFox adopts a dual-model framework: (i) an analysis LLM examines the low-level optimization source code and produces requirements on the high-level test programs that can trigger the optimization; (ii) a generation LLM produces test programs based on the summarized requirements. Additionally, optimization-triggering tests are used as feedback to further enhance the test generation on the fly. Our evaluation on four popular compilers shows that WhiteFox can generate high-quality tests to exercise deep optimizations requiring intricate conditions, practicing up to 80 more optimizations than state-of-the-art fuzzers. To date, WhiteFox has found in total 96 bugs, with 80 confirmed as previously unknown and 51 already fixed. Beyond compiler testing, WhiteFox can also be adapted for white-box fuzzing of other complex, real-world software systems in general.

arxiv情報

著者 Chenyuan Yang,Yinlin Deng,Runyu Lu,Jiayi Yao,Jiawei Liu,Reyhaneh Jabbarvand,Lingming Zhang
発行日 2023-10-24 16:39:06+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.LG, cs.PL, cs.SE パーマリンク