Novel techniques in recovering, embedding, and enforcing policies for control-flow integrity