Program flow and memory safety