Abstract. Fail-Safe C is a safe implementation of full ANSI-C being developed by Oiwa and Sekiguchi. It uses its own internal data representations such as 2-word pointers and memory blocks with headers describing their contents. Because of this, calls to external functions compiled by conventional compilers require conversion of data representations. Moreover, for safety, many of those functions need additional checks on their arguments and return values. This paper presents a method of semiautomatically generating a wrapper doing such work. Our approach is to develop an Interface Definition Language (IDL) to describe what the wrappers have to do before and after function calls. Our language is based on CamlIDL, which was developed for a similar purpose between Objective Caml and C. Our IDL processor generates code by using the types and attributes of functions. The attributes are additional information describing properties which cannot be expressed only by ordinary types, such as whether a pointer can be NULL, what range of memory can be safely accessed via a pointer, etc. We examined Linux system calls as test cases and designed a set of attributes necessary for generating their wrapper.
Suenaga et al. REF present an interface definition language for a situation similar to ours.
A.: The Interface Definition Language for Fail-Safe C
In: Proceedings of the 2003 International Symposium on Software Security. Lecture Notes in Computer Science
Computer Science