DIRA is a compile-time solution that provides automatic detection, identification, and repair of control-hijacking attacks. It uses memory updates logging to maintain a runtime log of all changes to a program's memory state. This log is used to detect attacks by checking for changes to control pointers, identify attacks by tracing data back to its source, and repair attacks by restoring memory states from pre-images in the log.