RUS  ENG
Full version
JOURNALS // Proceedings of the Institute for System Programming of the RAS // Archive

Proceedings of ISP RAS, 2023 Volume 35, Issue 5, Pages 169–192 (Mi tisp822)

Checking programs for compliance with MISRA C standard using the clang framework

R. A. Buchatskiya, Ya. A. Churkinba, K. A. Chibisova, M. V. Pantilimonova, E. V. Dolgodvorovac, A. V. Vyazovtsevac, A. G. Volokhova, V. V. Trunovac, G. H. Mirakyand, K. N. Kitaevac, A. A. Belevancevba

a Ivannikov Institute for System Programming of the RAS
b Lomonosov Moscow State University
c Moscow Institute of Physics and Technology
d Russian-Armenian University

Abstract: MISRA C is a collection of rules and recommendations for C programming language that is the de facto standard in industries where security plays the key role. The standard was developed by the MISRA (Motor Industry Software Reliability Association) consortium and includes a set of recommendations that allow the C language to be used to develop safe, reliable and portable software. MISRA is widely used in many industries with high reliability requirements, including aerospace, defense, automotive and medical. We have developed static checkers to check code for compliance with MISRA C 2012 secure coding standard. The developed checkers are based on the LLVM/clang compiler infrastructure. This paper describes the strategies underlying the design and implementation of checkers. Using MISRA C 2012 example suite, the proposed checkers determine compliance or violation of the recommendations with high accuracy. The checkers also show greater coverage and better performance than Cppcheck, a popular open-source static analyzer.

Keywords: MISRA, static analysis, symbolic execution, LLVM, Clang, Clang-Tidy, Clang static analyzer

DOI: 10.15514/ISPRAS-2023-35(5)-12



© Steklov Math. Inst. of RAS, 2024