jmp short 0x0导致永远循环 [英] jmp short 0x0 causing loop forever

查看:141
本文介绍了jmp short 0x0导致永远循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人告诉我,转换为目标代码 xeb\xfe的指令 jmp short 0x0会导致一个过程永远循环。

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?

推荐答案

这个问题看似模棱两可,但值得怀疑的是,原因是该指令会引起自己跳回去。 \xeb\xfe 的字面意思是从下一条指令的开头向前跳转-2个字节。由于该指令本身是2个字节长,因此跳转目标将是跳转指令本身。

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.

这篇关于jmp short 0x0导致永远循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆