1. A method for issuing an early warning (EW), comprising: determining, using a control flow graph representation of a program, locations in the program at which to insert EW code to monitor for an event; instrumenting the program with EW code to monitor for the event, by inserting EW code at the determined locations; upon detecting the event, performing, in the EW code, an early warning action.