Compiling c programs into a strongly typed assembly language

  • Authors:
  • Takahiro Kosakai;Toshiyuki Maeda;Akinori Yonezawa

  • Affiliations:
  • Department of Computer Science, Graduate School of Information Science and Technology, The University of Tokyo, Tokyo, Japan;Department of Computer Science, Graduate School of Information Science and Technology, The University of Tokyo, Tokyo, Japan;Department of Computer Science, Graduate School of Information Science and Technology, The University of Tokyo, Tokyo, Japan

  • Venue:
  • ASIAN'07 Proceedings of the 12th Asian computing science conference on Advances in computer science: computer and network security
  • Year:
  • 2007

Quantified Score

Hi-index 0.00

Visualization

Abstract

C is one of the most popular languages in system programming, though its unsafe nature often causes security vulnerabilities. In the face of this situation, many tools are developed to ensure safety properties of C programs. However, most of them work at the source code level, and conventional compilers lose safety guarantee as they translate source code into assembly code. In this paper, we present CTAL0, a strongly typed assembly language that is aimed at certifying the memory safety of assembly code compiled from C programs. CTAL0 is expressive enough to implement potentially unsafe ANSI C features including pointer arithmetics and casts. We have also implemented a type-checker and an experimental C compiler that produces safe CTAL0 assembly code by performing several transformations on given programs to avoid dangerous operations.