Digitala Vetenskapliga Arkivet

Change search
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf
Compiler fuzzing using equivalence-modulo-inputs and optimization-log-guided-fuzzing
KTH, School of Electrical Engineering and Computer Science (EECS).
2025 (English)Independent thesis Advanced level (degree of Master (Two Years)), 20 credits / 30 HE creditsStudent thesisAlternative title
Kompilatorfuzzning med equivalence-modulo-inputs och optimization-log-guided-fuzzing (Swedish)
Abstract [en]

Compilers are a necessary part in the development of any modern software. As a result, the correctness of compilers not only concerns the compilers themselves but also any software that has been compiled by them. In particular, in the domain of critical applications such as telecommunications, compiler bugs have the potential to cause significant harm. Compiler fuzzing is an approach to validating compilers that has seen significant success in detecting compiler bugs such as crashes and miscompilations that static test suites miss. Three approaches to compiler fuzzing are Equivalence-modulo-inputs, concrete value-tracking, and Optimization-log-guided (OLG) fuzzing. This thesis presents novel work in combining these three approaches by using concrete-value tracking to construct EMI-variants and guiding variant acceptance using metadata from optimization logs. By extending CFuzzer, an internal fuzzer at Ericsson with the aforementioned methods, we uncovered eight new bugs in Ericsson’s internal LLVM compiler flacc, where three of these were upstream LLVM bugs, in the course of a three-month period. Additionally, we show that this approach achieves higher coverage than previous iterations of CFuzzer and, in some cases, a shorter time between bug occurrences. We also show a correlation between LLVM remarks and compiler coverage, indicating that counting remarks is a good lightweight approximation of LLVM coverage.

Abstract [sv]

Kompilatorer är oumbärliga för all modern mjukvaruutveckling. En kompilators korrekthet är därmed ytterst viktig för att inte bara säkra kompilatorn själv från fel, utan också mjukvaran som den kompilerar. Kompilatorfuzzning är en valideringsmetod som innefattar att generera slumpmässiga testfall i syfte att upptäcka fel i kompilatorn som statiska testsviter missar. I och med att kompilatorer blivit mer komplexa har behovet av avancerade fuzzare ökat, och nya metoder beträffande kompilatorfuzzning har genom åren utvecklats i syfte att motverka härdning och diversifiera programmen som kan genereras av fuzzare. Tre av dessa är concrete-value-tracking, equivalence-modulo-inputs (EMI) och optimization-log-guided (OLG) fuzzing. Även om dessa metoder har visat sig effektiva i sig själva har ingen tidigare kombinerat dessa tre metoder. I denna rapport visas hur concrete-value tracking kan nyttjas för att genomföra EMI-muteringar som i sin tur kan styras av statistiska modeller som innefattar data från optimeringsloggar. Detta i syfte att testa en version av LLVM utvidgad med stöd för DSP-C; ett tillvägagångssätt som avtäckte åtta tidigare okända kompilatorbuggar, ökade kodtäckningen och i vissa fall fann fel i kompilatorn på kortare tid än tidigare utforskade metoder. Dessutom visar denna rapport en korrelation mellan LLVMs inbyggda remarks och kodtäckning av LLVM-komponenter vilket tyder på att dessa är en god approximation av den verkliga kodtäckningen.

Place, publisher, year, edition, pages
2025. , p. 70
Series
TRITA-EECS-EX ; 2025:559
Keywords [en]
compiler fuzzing, compiler testing, testing, EMI, OLG
Keywords [sv]
kompilatortestning, fuzztestning, testning, EMI, OLG
National Category
Computer and Information Sciences
Identifiers
URN: urn:nbn:se:kth:diva-368214OAI: oai:DiVA.org:kth-368214DiVA, id: diva2:1987619
External cooperation
Ericsson
Supervisors
Examiners
Available from: 2025-08-11 Created: 2025-08-06 Last updated: 2025-08-11Bibliographically approved

Open Access in DiVA

fulltext(687 kB)230 downloads
File information
File name FULLTEXT01.pdfFile size 687 kBChecksum SHA-512
ce08fb8b2768aabd4efed31aead15dd5302c360b5346bfc9e1158ce1df45aa6e5e59ccc81a85e4b7d865863dff704ef1518ad3a67ed2b3d187e2f7e15c4b14be
Type fulltextMimetype application/pdf

By organisation
School of Electrical Engineering and Computer Science (EECS)
Computer and Information Sciences

Search outside of DiVA

GoogleGoogle Scholar
Total: 232 downloads
The number of downloads is the sum of all downloads of full texts. It may include eg previous versions that are now no longer available

urn-nbn

Altmetric score

urn-nbn
Total: 964 hits
CiteExportLink to record
Permanent link

Direct link
Cite
Citation style
  • apa
  • ieee
  • modern-language-association-8th-edition
  • vancouver
  • Other style
More styles
Language
  • de-DE
  • en-GB
  • en-US
  • fi-FI
  • nn-NO
  • nn-NB
  • sv-SE
  • Other locale
More languages
Output format
  • html
  • text
  • asciidoc
  • rtf