1. A computer-implemented method comprising: loading a native code module into a secure runtime environment of a computer, the module in the secure runtime environment having a code region divided into equal sized code blocks and data blocks; determining that the native code module has control flow integrity by: determining that each data block in the code region begins with a respective illegal instruction, whereby a transfer of control flow to the beginning of any of the data blocks causes the native code module to stop executing; determining that all control flow instructions in the code region are either branch-and-link instructions or branch-and-exchange instructions; computing direct control flow targets for all direct control flow instructions and determining that all of the direct control flow targets correspond to valid instructions; determining that every Thumb instruction in the code region is disabled; and determining that every destination address associated with an indirect control flow instruction is masked to clear a set of upper-most bits and a set of lower-most bits in the destination address; and then beginning execution of the native code module.