Automatic Bug Detection in Microcontroller Software by Static Program Analysis

Ansgar Fehnker, Ralf Huuck, Bastian Schlich, Michael Tapp

Research output: Chapter in Book/Report/Conference proceedingConference contributionAcademicpeer-review

6 Citations (Scopus)

Abstract

Microcontroller software typically consists of a few hundred lines of code only, but it is rather different from standard application code. The software is highly hardware and platform specific, and bugs are often a consequence of neglecting subtle specifications of the microcontroller architecture. Currently, there are hardly any tools for analyzing such software automatically. In this paper, we outline specifics of microcontroller software that explain why those programs are different to standard C/C++ code. We develop a static program analysis for a specific microcontroller, in our case the ATmega16, to spot code deficiencies, and integrate it into our generic static analyzer Goanna. Finally, we illustrate the results by a case study of an automotive application. The case study highlights that – even without formal proof – the proposed static techniques can be valuable in pinpointing software bugs that are otherwise hard to find.
Original languageEnglish
Title of host publicationSOFSEM 2009: Theory and Practice of Computer Science
Subtitle of host publication35th Conference on Current Trends in Theory and Practice of Computer Science, Spindleruv Mlýn, Czech Republic, January 24-30, 2009. Proceedings
EditorsMogens Nielsen, Antonín Kucera, Peter Bro Miltersen, Catuscia Palamidessi, Petr Tuma, Frank D. Valencia
Place of PublicationBerlin
PublisherSpringer
Pages267-278
Number of pages12
ISBN (Electronic)978-3-540-95891-8
ISBN (Print)978-3-540-95890-1
DOIs
Publication statusPublished - 2009
Externally publishedYes
Event35th Conference on Current Trends in Theory and Practice of Computer Science, SOFSEM 2009 - Špindlerův Mlýn, Czech Republic
Duration: 24 Jan 200930 Jan 2009
Conference number: 35

Publication series

NameLecture Notes in Computer Science
PublisherSpringer
Volume5404
ISSN (Print)0302-9743
ISSN (Electronic)1611-3349

Conference

Conference35th Conference on Current Trends in Theory and Practice of Computer Science, SOFSEM 2009
Abbreviated titleSOFSEM
CountryCzech Republic
CityŠpindlerův Mlýn
Period24/01/0930/01/09

Fingerprint

Microcontrollers
Specifications
Hardware

Keywords

  • Model Check
  • Code Base
  • Direct Memory Access
  • Kripke Structure
  • Large State Space

Cite this

Fehnker, A., Huuck, R., Schlich, B., & Tapp, M. (2009). Automatic Bug Detection in Microcontroller Software by Static Program Analysis. In M. Nielsen, A. Kucera, P. B. Miltersen, C. Palamidessi, P. Tuma, & F. D. Valencia (Eds.), SOFSEM 2009: Theory and Practice of Computer Science: 35th Conference on Current Trends in Theory and Practice of Computer Science, Spindleruv Mlýn, Czech Republic, January 24-30, 2009. Proceedings (pp. 267-278). (Lecture Notes in Computer Science; Vol. 5404). Berlin: Springer. https://doi.org/10.1007/978-3-540-95891-8_26
Fehnker, Ansgar ; Huuck, Ralf ; Schlich, Bastian ; Tapp, Michael. / Automatic Bug Detection in Microcontroller Software by Static Program Analysis. SOFSEM 2009: Theory and Practice of Computer Science: 35th Conference on Current Trends in Theory and Practice of Computer Science, Spindleruv Mlýn, Czech Republic, January 24-30, 2009. Proceedings. editor / Mogens Nielsen ; Antonín Kucera ; Peter Bro Miltersen ; Catuscia Palamidessi ; Petr Tuma ; Frank D. Valencia. Berlin : Springer, 2009. pp. 267-278 (Lecture Notes in Computer Science).
@inproceedings{acd228f21dcb47119ed626a06a46551a,
title = "Automatic Bug Detection in Microcontroller Software by Static Program Analysis",
abstract = "Microcontroller software typically consists of a few hundred lines of code only, but it is rather different from standard application code. The software is highly hardware and platform specific, and bugs are often a consequence of neglecting subtle specifications of the microcontroller architecture. Currently, there are hardly any tools for analyzing such software automatically. In this paper, we outline specifics of microcontroller software that explain why those programs are different to standard C/C++ code. We develop a static program analysis for a specific microcontroller, in our case the ATmega16, to spot code deficiencies, and integrate it into our generic static analyzer Goanna. Finally, we illustrate the results by a case study of an automotive application. The case study highlights that – even without formal proof – the proposed static techniques can be valuable in pinpointing software bugs that are otherwise hard to find.",
keywords = "Model Check, Code Base, Direct Memory Access, Kripke Structure, Large State Space",
author = "Ansgar Fehnker and Ralf Huuck and Bastian Schlich and Michael Tapp",
year = "2009",
doi = "10.1007/978-3-540-95891-8_26",
language = "English",
isbn = "978-3-540-95890-1",
series = "Lecture Notes in Computer Science",
publisher = "Springer",
pages = "267--278",
editor = "Mogens Nielsen and Anton{\'i}n Kucera and Miltersen, {Peter Bro} and Catuscia Palamidessi and Petr Tuma and Valencia, {Frank D.}",
booktitle = "SOFSEM 2009: Theory and Practice of Computer Science",

}

Fehnker, A, Huuck, R, Schlich, B & Tapp, M 2009, Automatic Bug Detection in Microcontroller Software by Static Program Analysis. in M Nielsen, A Kucera, PB Miltersen, C Palamidessi, P Tuma & FD Valencia (eds), SOFSEM 2009: Theory and Practice of Computer Science: 35th Conference on Current Trends in Theory and Practice of Computer Science, Spindleruv Mlýn, Czech Republic, January 24-30, 2009. Proceedings. Lecture Notes in Computer Science, vol. 5404, Springer, Berlin, pp. 267-278, 35th Conference on Current Trends in Theory and Practice of Computer Science, SOFSEM 2009, Špindlerův Mlýn, Czech Republic, 24/01/09. https://doi.org/10.1007/978-3-540-95891-8_26

Automatic Bug Detection in Microcontroller Software by Static Program Analysis. / Fehnker, Ansgar ; Huuck, Ralf; Schlich, Bastian; Tapp, Michael.

SOFSEM 2009: Theory and Practice of Computer Science: 35th Conference on Current Trends in Theory and Practice of Computer Science, Spindleruv Mlýn, Czech Republic, January 24-30, 2009. Proceedings. ed. / Mogens Nielsen; Antonín Kucera; Peter Bro Miltersen; Catuscia Palamidessi; Petr Tuma; Frank D. Valencia. Berlin : Springer, 2009. p. 267-278 (Lecture Notes in Computer Science; Vol. 5404).

Research output: Chapter in Book/Report/Conference proceedingConference contributionAcademicpeer-review

TY - GEN

T1 - Automatic Bug Detection in Microcontroller Software by Static Program Analysis

AU - Fehnker, Ansgar

AU - Huuck, Ralf

AU - Schlich, Bastian

AU - Tapp, Michael

PY - 2009

Y1 - 2009

N2 - Microcontroller software typically consists of a few hundred lines of code only, but it is rather different from standard application code. The software is highly hardware and platform specific, and bugs are often a consequence of neglecting subtle specifications of the microcontroller architecture. Currently, there are hardly any tools for analyzing such software automatically. In this paper, we outline specifics of microcontroller software that explain why those programs are different to standard C/C++ code. We develop a static program analysis for a specific microcontroller, in our case the ATmega16, to spot code deficiencies, and integrate it into our generic static analyzer Goanna. Finally, we illustrate the results by a case study of an automotive application. The case study highlights that – even without formal proof – the proposed static techniques can be valuable in pinpointing software bugs that are otherwise hard to find.

AB - Microcontroller software typically consists of a few hundred lines of code only, but it is rather different from standard application code. The software is highly hardware and platform specific, and bugs are often a consequence of neglecting subtle specifications of the microcontroller architecture. Currently, there are hardly any tools for analyzing such software automatically. In this paper, we outline specifics of microcontroller software that explain why those programs are different to standard C/C++ code. We develop a static program analysis for a specific microcontroller, in our case the ATmega16, to spot code deficiencies, and integrate it into our generic static analyzer Goanna. Finally, we illustrate the results by a case study of an automotive application. The case study highlights that – even without formal proof – the proposed static techniques can be valuable in pinpointing software bugs that are otherwise hard to find.

KW - Model Check

KW - Code Base

KW - Direct Memory Access

KW - Kripke Structure

KW - Large State Space

U2 - 10.1007/978-3-540-95891-8_26

DO - 10.1007/978-3-540-95891-8_26

M3 - Conference contribution

SN - 978-3-540-95890-1

T3 - Lecture Notes in Computer Science

SP - 267

EP - 278

BT - SOFSEM 2009: Theory and Practice of Computer Science

A2 - Nielsen, Mogens

A2 - Kucera, Antonín

A2 - Miltersen, Peter Bro

A2 - Palamidessi, Catuscia

A2 - Tuma, Petr

A2 - Valencia, Frank D.

PB - Springer

CY - Berlin

ER -

Fehnker A, Huuck R, Schlich B, Tapp M. Automatic Bug Detection in Microcontroller Software by Static Program Analysis. In Nielsen M, Kucera A, Miltersen PB, Palamidessi C, Tuma P, Valencia FD, editors, SOFSEM 2009: Theory and Practice of Computer Science: 35th Conference on Current Trends in Theory and Practice of Computer Science, Spindleruv Mlýn, Czech Republic, January 24-30, 2009. Proceedings. Berlin: Springer. 2009. p. 267-278. (Lecture Notes in Computer Science). https://doi.org/10.1007/978-3-540-95891-8_26