Patent ID: 8141061

Claim:
A method of detecting incorrect alias assumptions in compiled program code, the method comprising: determining if a flag for alias assumption violation detection is set; in response to the flag being set, assigning by a processor unit storage locations to variables of a computer program designated to a compiler as alias-free variables that are asserted as not having aliases; assigning by the processor unit a respective memory key placeholder to each of the alias-free variables in the computer program; generating by a compiler memory keys of the memory key placeholders that each corresponds to the storage locations of the alias-free variables such that access to the storage locations of the alias-free variables is granted to blocks of code in the computer program that have knowledge of the memory keys; and in response to a command, executing by the processor unit the compiler to selectively generate code to detect violations of alias assumptions during execution of the computer program and to add the generated code to the computer program.