1. A method comprising: providing an original code in a machine code form; scanning the original code and identifying first code of a first code type within the original code that does not allocate memory for metadata; scanning the original code and identifying second code of a second code type within the code that not store metadata by augmenting them with extra instructions to allocate memory for metadata; scanning the original code and identifying third code of a third code type within the code that not propagate metadata by augmenting them with extra instructions to allocate memory for metadata; for an instance of the first code in the original code, translating and replacing the first code with fourth code in a replacement code, wherein the fourth code stores and populates metadata such that metadata are readily available at runtime for checking programming errors of the original code; for an instance of the second code in the original code, translating and replacing the second code with fifth code in the replacement code, wherein the fifth code stores and populates metadata such that metadata are readily available at runtime for checking programming errors of the original code; for an instance of the third code in the original code, translating and replacing the third code with sixth code in the replacement code, wherein the sixth code stores and populates metadata such that metadata are readily available at runtime for checking programming errors of the original code; and obtaining the replacement code including the fourth, fifth, and sixth codes, wherein the when executed, the replacement code performs the same software functionality as the original code and prevents at least one of buffer overflow, buffer overrun, or use-after-free type errors.