Abstract

This chapter presents a way of narrowing down failure causes even further. By extracting and comparing program states, delta debugging automatically isolates the variables and values that cause the failure, resulting in a cause–effect chain of the failure. To see how differences propagate along program states, one must find a way of capturing program states. At the lowest level, this is simple: As the program stores its state in computer memory, all one needs is a dump of that memory region. When it comes to comparing program states, the same level of abstraction level is required, that is, the program state in terms of variables, values, and structures. Unfortunately, this naive approach is not enough. One must record the values of references , such as a or argv, and must take into account the data structures being referenced. One simple approach toward doing so is to unfold the program state—that is, follow all references until the state reaches a fix point. Such a process can easily be automated as long as we can accurately determine the types and sizes of all objects. Focusing on the differences between two states can be helpful for debugging—simply because the differences in the state cause the failure.

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.