C‐strider: type‐aware heap traversal for C. (14th May 2015) - Saur, Karla; Hicks, Michael; Foster, Jeffrey S.
Summary: Researchers have proposed many tools and techniques that work by traversing the heap, including checkpointing systems, heap profilers, heap assertion checkers, and dynamic software updating systems. Yet building a heap traversal for C remains difficult, and to our knowledge, extant services have used their own application‐specific traversals. This paper presents C‐strider, a framework for writing C heap traversals and transformations. Writing a basic C‐strider service requires implementing only four callbacks; C‐strider then generates a program‐specific traversal that invokes the callbacks as each heap location is visited. Critically, C‐strider is type aware – it tracks types as it walks the heap, so every callback is supplied with the exact type of the associated location. We used C‐strider to implement heap serialization, dynamic software updating, heap checking, and profiling, and then applied the resulting traversals to several programs. We found that C‐strider requires little programmer effort, and the resulting services are efficient and effective. Copyright © 2015 John Wiley & Sons, Ltd.