Ole André Vadla Ravnås
e0276cdb64
Fix use of uninitialized value for some instructions
...
Caught by Valgrind:
Conditional jump or move depends on uninitialised value(s)
at 0xD5BB6F: readModRM (X86DisassemblerDecoder.c:1528)
by 0xD5BF02: getIDWithAttrMask (X86DisassemblerDecoder.c:1101)
by 0xD5CC5E: getID (X86DisassemblerDecoder.c:1249)
by 0xD5CC5E: decodeInstruction (X86DisassemblerDecoder.c:2335)
by 0xD52009: X86_getInstruction (X86Disassembler.c:822)
by 0xD51781: cs_disasm (cs.c:503)
2016-09-26 15:01:18 +02:00
David Carne
8fb6b89113
x86: initialize eaDisplacement in 16-bit mode. Fixes #656
2016-07-18 23:28:04 +08:00
tandasat
8d377f3b7b
address warnings with capstone_static_winkernel
2016-05-04 05:54:28 -07:00
Nguyen Anh Quynh
896d69f4ad
x86: handle some AVX & segment-related instructions properly. this fixes a segfault reported by @revskills
2016-04-19 15:41:16 +08:00
Nguyen Anh Quynh
da470f35b2
x86: coding style
2015-10-08 15:49:12 +08:00
bughoho
55cd95e497
add dedicated variables such as prefix2e, prefix36, prefix66, prefix67, etc
2015-10-07 14:47:24 +08:00
Nguyen Anh Quynh
e5aa75131b
x86: treat prefix-only sequences of bytes as invalid code. this fixes a NDP reported by @felixgr
2015-06-16 11:57:45 +08:00
Nguyen Anh Quynh
c0bf7f6e48
x86: revert the old change that check prefix location more strictly
2015-06-04 21:30:15 +08:00
Ole André Vadla Ravnås
fde2d483d0
Fix handling of cmpxchg16b with lock prefix
...
This was discovered when Frida's Stalker encountered the following
x86-64 instruction while tracing code in ntdll: `f0 49 0f c7 0a`.
2015-04-23 20:44:03 +08:00
reverser
cf6201419a
Add support to embed Capstone into OS X kernel extensions.
2015-04-10 23:28:12 +08:00
Nguyen Anh Quynh
52ef895d53
x86: tighter check on return of consumeByte() & lookAtByte(). this fixes the segfault on the sole input of 0xf3 reported by windhl
2015-04-08 12:18:33 +08:00
Nguyen Anh Quynh
e1bde17b6b
x86: fix instruction 66f20f59ff reported by @maijin
2015-04-02 12:44:23 +08:00
Nguyen Anh Quynh
3cd999f631
x86: fix the pause instruction reported by @maijin in issue #298
2015-04-02 12:44:11 +08:00
Nguyen Anh Quynh
d50dcc5384
x86: F2 can be a part of instruction encoding, but not a prefix
2015-03-11 11:16:04 +08:00
Nguyen Anh Quynh
7334a88041
Merge branch 'master' into v3
2015-03-03 11:43:36 +08:00
Félix Cloutier
f7e5bfe315
Silencing Clang warning about losing precision
2015-03-02 22:19:58 -05:00
Nguyen Anh Quynh
ed46b0b27a
x86: allow prefixes to be positioned anywhere. this should fix the bug reported by Gabriel Quadros
2015-02-26 07:09:34 +08:00
Nguyen Anh Quynh
c48a16aeca
x86: add the missing X86 instructions in X86_REDUCE mode in X86DisassemblerDecoder.c. bug reported by Julian Stecklina
2015-02-12 09:02:25 +08:00
Nguyen Anh Quynh
759ee4c811
x86: add the missing X86 instructions in X86_REDUCE mode in X86DisassemblerDecoder.c. bug reported by Julian Stecklina
2015-02-12 09:01:59 +08:00
Nguyen Anh Quynh
e95a76611c
x86: remove some instructions unsupported in 3.x version
2015-01-13 14:35:43 +08:00
Nguyen Anh Quynh
25525fb20c
x86: remove some instructions irrelevant for LOCK prefix in invalidPrefix()
2015-01-13 12:14:46 +08:00
Andrew Wesie
29f41da4c2
x86: add more valid instructions for LOCK prefix
2015-01-13 12:04:12 +08:00
Nguyen Anh Quynh
5323128ed2
x86: check for invalid instructions with LOCK prefix
2015-01-13 12:04:02 +08:00
Nguyen Anh Quynh
599b559455
x86: fix some compilation issues about missing instructions on CAPSTONE_X86_REDUCE setup
2014-12-31 10:42:16 +08:00
Nguyen Anh Quynh
c51e04fa97
x86: support CR9-CR15 registers
2014-12-27 23:56:14 +08:00
Nguyen Anh Quynh
9f694cc934
x86: handle undocumented immediates for (v)cmpps/pd/ss/sd instructions
2014-12-26 17:54:11 +08:00
Nguyen Anh Quynh
2ac7941227
x86: handle REX properly for segment related instructions by ignoring REX.r entirely
2014-12-24 16:16:51 +08:00
Nguyen Anh Quynh
80959c9a25
code style
2014-12-24 16:03:10 +08:00
Nguyen Anh Quynh
094811415c
x86: handle REX properly for x64 MMX related instructions by ignoring REX.b & REX.w entirely
2014-12-24 16:02:44 +08:00
Nguyen Anh Quynh
51754231b9
x86: check instruction size <=15 as soon as possible
2014-12-18 00:20:07 +08:00
Nguyen Anh Quynh
3539595183
x86: instruction length must be <= 15
2014-12-17 23:53:32 +08:00
Nguyen Anh Quynh
a3d689de51
x86: allow to mix REX & legacy prefix repeatedly in any order
2014-12-16 22:36:16 +08:00
Nguyen Anh Quynh
1016d3214d
x86: only eliminate REX prefixes if next byte is not a legacy prefix
2014-12-13 10:27:56 +08:00
Nguyen Anh Quynh
1cbc222626
x86: eliminate redundant REX prefixes in front of x86_64 instruction. bug reported by Aurélien Wailly
2014-12-13 01:41:49 +08:00
Nguyen Anh Quynh
c2925e9034
x86: accept more than one REX prefix for x86_64. bug reported by Aurélien Wailly. thanks Ange Albertini for help
2014-12-12 18:31:31 +08:00
Nguyen Anh Quynh
4e20e8e24d
x86: 0x66 & 0x67 cannot be anywhere. this fixes CRC32 instruction
2014-11-10 07:43:49 +08:00
Nguyen Anh Quynh
19c63bcf1f
x86: hacky temporarily fix for FEMMS instruction (3DNow). bug reported by Ben Nagy
2014-11-07 12:29:50 +08:00
Nguyen Anh Quynh
c96f1b06b2
x86: fix Out-of-bounds read error in is16BitEquivalent(). issue reported by Coverity
2014-10-01 14:35:29 +08:00
Nguyen Anh Quynh
72bbcacb88
x86: temporarily solve conflicts caused by the last merge
2014-09-15 14:17:49 +08:00
Nguyen Anh Quynh
c44acedc79
x86: properly zero-out x86.operands[]
2014-08-27 10:38:40 +08:00
obs
2725a3fea8
X86GenInstrInfo size reduction
2014-08-19 20:12:39 +02:00
Nguyen Anh Quynh
0b690387b3
x86: update core with upstream. this added bunch of new instructions & groups. also updated Python & Java bindings after the core change
2014-08-13 13:01:50 +08:00
Nguyen Anh Quynh
af6db2afe8
x86: handle RIP relative addressing in 64bit mode properly. bug reported by @hlide
2014-06-30 02:01:04 +08:00
Nguyen Anh Quynh
f1ec52628e
x86: provide size for X86_OP_IMM operand. thank Gabriel Quadros for some suggestions
2014-06-25 22:03:18 +08:00
Nguyen Anh Quynh
eb2f3fb85a
x86: properly reset prefixPresent for prefix0/1 group
2014-06-20 11:15:58 +08:00
Nguyen Anh Quynh
9cf88119fb
x86: InternalInstruction@xAcquireRelease should be initialized to 0 (FALSE)
2014-06-16 18:32:34 +08:00
Nguyen Anh Quynh
22a5a761d8
x86: simplify byteReader_t
2014-06-07 23:41:20 +08:00
Nguyen Anh Quynh
5474d877b0
x86: optimize struct InternalInstruction for memset(). this improve performance by around 4%
2014-06-07 12:56:44 +08:00
Nguyen Anh Quynh
e70a043a04
x86: more simplification for better performance
2014-06-05 10:52:43 +08:00
Nguyen Anh Quynh
46b6693d36
x86: save prefixes to avoid expensive copying loop. based on idea of Dang Hoang Vu
2014-06-04 19:04:46 +08:00