Abstract / Description of output
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.
Original language | English |
---|---|
Title of host publication | Proceedings of the 28th International Conference on Compiler Construction |
Place of Publication | Washington, DC, USA |
Publisher | ACM |
Pages | 76-86 |
Number of pages | 11 |
ISBN (Electronic) | 978-1-4503-6277-1 |
DOIs | |
Publication status | Published - 16 Feb 2019 |
Event | 28th International Conference on Compiler Construction - Washington D.C., United States Duration: 16 Feb 2019 → 17 Feb 2019 https://cc-conference.github.io/19/ |
Conference
Conference | 28th International Conference on Compiler Construction |
---|---|
Abbreviated title | CC 2019 |
Country/Territory | United States |
City | Washington D.C. |
Period | 16/02/19 → 17/02/19 |
Internet address |
Keywords / Materials (for Non-textual outputs)
- C++
- exceptions
- error handling
- software performance
- Language features