问题
I am told that the instruction "jmp short 0x0" which translates to the object code '\xeb\xfe' causes a process to loop forever. How exactly does this work?
回答1:
This question seems disingenuous, but giving the benefit of the doubt, the reason is that the instruction will elicit a jump back to itself. \xeb\xfe
translates literally to "Jump ahead -2 bytes from the start of the next instruction." Since this instruction is itself 2 bytes long, the jump destination will be the jump instruction itself.
来源:https://stackoverflow.com/questions/5609745/jmp-short-0x0-causing-loop-forever