angr / angr/pyvex

pyvex fails to decode some Mov instructions with 66 prefix

Đang mở
#536 4 bình luận 0 reaction 0 người được giao Xem trên GitHub
bug needs-triage
Ngôn ngữ chính
Python
Star
379
Fork
129
Merge trung bình
11 giờ 45 phút
Pull request đã merge (30 ngày)
8

Mô tả

### Description

pyvex sets jumpkind to 'Ijk_NoDecode' for some MOVSX/MOVZX instructions with '66' prefix.

### Steps to reproduce the bug

Run the following test:

```
import unittest

import pyvex

class Tests(unittest.TestCase):

def test_amd64_movzx_66_prefix(self):
inst_bytes = b"\x66\x0f\xb7\xc0" # movzx ax, ax

irsb = pyvex.IRSB(inst_bytes, 0, pyvex.ARCH_AMD64)
assert irsb.jumpkind == "Ijk_Boring"
assert irsb.size == 4

def test_amd64_movsx_66_prefix(self):
inst_bytes = b"\x66\x0f\xbf\xc0" # movsx ax, ax

irsb = pyvex.IRSB(inst_bytes, 0, pyvex.ARCH_AMD64)
assert irsb.jumpkind == "Ijk_Boring"
assert irsb.size == 4

def test_amd64_movzx_66_prefix_memory(self):
inst_bytes = b"\x66\x45\x0f\xb7\x5c\x27\x6a" # movzx r11w, word ptr [r15 + riz + 0x6a]

irsb = pyvex.IRSB(inst_bytes, 0, pyvex.ARCH_AMD64)
assert irsb.jumpkind == "Ijk_Boring"
assert irsb.size == 7

if __name__ == "__main__":
unittest.main()
```

### Environment

pyvex version 9.2.213.dev0

### Additional context

_No response_

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.