Interface compliance of inline assembly: automatically check, patch and refine - CEA - Commissariat à l’énergie atomique et aux énergies alternatives Accéder directement au contenu
Communication Dans Un Congrès Année : 2021

Interface compliance of inline assembly: automatically check, patch and refine

Résumé

Inline assembly is still a common practice in low-level C programming, typically for efficiency reasons or for accessing specific hardware resources. Such embedded assembly codes in the GNU syntax (supported by major compilers such as GCC, Clang and ICC) have an interface specifying how the assembly codes interact with the C environment. For simplicity reasons, the compiler treats GNU inline assembly codes as blackboxes and relies only on their interface to correctly glue them into the compiled C code. Therefore, the adequacy between the assembly chunk and its interface (named compliance) is of primary importance, as such compliance issues can lead to subtle and hard-to-find bugs. We propose RUSTInA, the first automated technique for formally checking inline assembly compliance, with the extra ability to propose (proven) patches and (optimization) refinements in certain cases. RUSTInA is based on an original formalization of the inline assembly compliance problem together with novel dedicated algorithms. Our prototype has been evaluated on 202 Debian packages with inline assembly (2656 chunks), finding 2183 issues in 85 packages - 986 significant issues in 54 packages (including major projects such as ffmpeg or ALSA), and proposing patches for 92% of them. Currently, 38 patches have already been accepted (solving 156 significant issues), with positive feedback from development teams.
Fichier principal
Vignette du fichier
camera_ready.pdf (397.76 Ko) Télécharger le fichier
Origine : Fichiers produits par l'(les) auteur(s)

Dates et versions

cea-04228171 , version 1 (04-10-2023)

Identifiants

Citer

Frederic Recoules, Sébastien Bardin, Richard Bonichon, Matthieu Lemerre, Laurent Mounier, et al.. Interface compliance of inline assembly: automatically check, patch and refine. 2021 IEEE/ACM - 43rd International Conference on Software Engineering, May 2021, Madrid, Spain. pp.1236-1247, ⟨10.1109/ICSE43902.2021.00113⟩. ⟨cea-04228171⟩
9 Consultations
151 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More