What's the purpose of the CIL nop opcode?

前端 未结 19 1298
被撕碎了的回忆
被撕碎了的回忆 2020-12-07 10:42

I\'m going through MSIL and noticing there are a lot of nop instructions in the MSIL.

The MSDN article says they take no action and are used to fill space if the opc

相关标签:
19条回答
  • 2020-12-07 11:12

    As ddaa said, nops let you account for variance in the stack, so that when you overwrite the return address it jumps to the nop sled (a lot of nops in a row) and then hits the executable code correctly, rather than jumping to some byte in the instruction that isn't the beginning.

    0 讨论(0)
提交回复
热议问题