Heap Fuzzing: Automatic Garbage Collection Testing with Expert-Guided Random Events - Inria - Institut national de recherche en sciences et technologies du numérique Accéder directement au contenu
Communication Dans Un Congrès Année : 2023

Heap Fuzzing: Automatic Garbage Collection Testing with Expert-Guided Random Events

Résumé

Producing robust memory manager implementations is a challenging task. Defects in garbage collection algorithms produce subtle effects that are revealed later in program execution as memory corruptions. This problem is exacerbated by the fact that garbage collection algorithms deal with low-level implementation details to be efficient. Finding, reproducing, and debugging such bugs is complex and time-consuming. In this article, we propose to fuzz heaps by generating large sequences of random heap events guided by virtual machine experts. Randomly generated events exercise the garbage collection algorithm with the objective of crashing the virtual machine and finding bugs. Once a bug is found, we use a test case reduction algorithm to find the smaller subset of events that reproduces the issue. We implemented our approach on top of the virtual machine simulator of the Pharo Virtual Machine, to test its sequential stopthe-world generational scavenger. Experts guided our fuzzing toward the ephemeron finalization mechanism, corner allocation cases, and the heap compaction algorithm. Our prototype found 6 bugs: 3 in Pharo's ephemeron implementation which is not yet in production, 2 bugs in the default compactor which has been in production for 8 years, and 1 bug in the VM simulator used daily by VM developers. We show how such test cases were automatically reduced to trivial sequences that were easy to debug.
Fichier principal
Vignette du fichier
main.pdf (260.35 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

hal-03962007 , version 1 (29-01-2023)

Licence

Paternité

Identifiants

  • HAL Id : hal-03962007 , version 1

Citer

Guillermo Polito, Pablo Tesone, Jean Privat, Nahuel Palumbo, Stéphane Ducasse. Heap Fuzzing: Automatic Garbage Collection Testing with Expert-Guided Random Events. ICST 2023 - International Conference on Software Testing, Apr 2023, Dublin, Ireland. ⟨hal-03962007⟩
93 Consultations
281 Téléchargements

Partager

Gmail Facebook X LinkedIn More