~/talk

Correct Use of Integers in Safety-critical Systems

Talkat NDC TechTown 2024 · 2024-09-09..09-12· [security]
slides:none on file

Argues that MISRA and AUTOSAR rules requiring replacement of standard integers with exact-width typedefs make code less safe and less portable, showing concrete failures from integer promotions (e.g., unsigned 16-bit multiply producing UB when promoted to int), compiler divergence, and ABI pain. Recommends using standard C/C++ types for ordinary arithmetic, reserving exact-width types for registers, protocols and file layouts, adding static_asserts to document assumptions, and relying on static analysis vendors that pragmatically relax the rule.

AI-written summary · about

  1. 0:00Integer portability in safety systems
  2. 1:08Functional safety and portability
  3. 3:16Portability types and C terms
  4. 7:10Problems with conforming programs
  5. 9:21Portability versus safety
  6. 11:09MISRA C integer type rules
  7. 17:55MISRA C++ 2023 exact-width types
  8. 23:08Exact-width types harm portability
  9. 27:04Undefined behavior with uint16
  10. 29:56MISRA compliance and type mismatches
  11. 33:10Portable code without exact-width types
  12. 36:24Portability trade-offs in safety code
  13. 38:33Conforming code and reference platforms
  14. 41:46Integer type selection and API design
  15. 45:27When to use exact-width types
  16. 47:58MISRA rules and alternatives
  17. 51:11MISRA rule rationale and knowledge
  18. 51:31Regulation compliance and liability
  19. 53:16Portability versus target architecture
  20. 56:10Balancing portability, performance, safety
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.