the runtime itself may read or write to the native stack for example the v8 runtime walks the native stack during garbage collection to find all pointers to data and code changing any such pointer or any other data on the stack leads to program errors and crashes therefore native stack contents preferably are identical when running with and without librando this includes return addresses when a diversified function calls another diversified function the former pushes the undiversified address on the stack fig6 illustrates this transformation the original call pushes the address of the next instruction on the stack then jumps to the called function as illustrated it replaced with a push jmp pair that pushes the undiversified return address there is one exception to this restriction any memory past the top of the stack below rsp may be considered to be unused so it may be used to save registers in some embodiments undiversified code instructions are preserved jit compilers frequently emit code with temporary placeholders then later replace them with other instructions the compiler usually uses fixed instruction sequences for these placeholders so it first checks their contents before patching in other cases certain instruction sequences are used flag properties of emitted code the library cannot modify.