Edinburgh Research Explorer

Low-cost Deterministic C++ Exceptions for Embedded Systems

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Related Edinburgh Organisations

Open Access permissions

Open

Documents

https://dl.acm.org/citation.cfm?doid=3302516.3307346
Original languageEnglish
Title of host publicationProceedings of the 28th International Conference on Compiler Construction (CC2019)
Place of PublicationWashington, DC, USA
PublisherACM
Pages76-86
Number of pages11
ISBN (Electronic)978-1-4503-6277-1
DOIs
StatePublished - 16 Feb 2019
Event28th International Conference on Compiler Construction - Washington D.C., United States
Duration: 16 Feb 201917 Feb 2019
https://cc-conference.github.io/19/

Conference

Conference28th International Conference on Compiler Construction
Abbreviated titleCC 2019
CountryUnited States
CityWashington D.C.
Period16/02/1917/02/19
Internet address

Abstract

The C++ programming language offers a strong exception mechanism for error handling at the language level, improving code readability, safety, and maintainability. However, current C++ implementations are targeted at general-purpose systems, often sacrificing code size, memory usage, and resource determinism for the sake of performance. This makes C++ exceptions a particularly undesirable choice for embedded applications where code size and resource determinism are often paramount. Consequently, embedded coding guidelines either forbid the use of C++ exceptions, or embedded C++ tool chains omit exception handling altogether. In this paper, we develop a novel implementation of C++ exceptions that eliminates these issues, and enables their use for embedded systems. We combine existing stack unwinding techniques with a new approach to memory management and run-time type information (RTTI). In doing so we create a compliant C++ exception handling implementation, providing bounded runtime and memory usage, while reducing code size requirements by up to 82%, and incurring only a minimal runtime overhead for the common case of no exceptions.

Event

28th International Conference on Compiler Construction

16/02/1917/02/19

Washington D.C., United States

Event: Conference

Download statistics

No data available

ID: 78306656