ChangeLog 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702
  1. This file details the changelog of Capstone.
  2. ---------------------------------
  3. Version 4.0.1: January 10th, 2019
  4. [ Core ]
  5. - Fix some issues for packaging (Debian, Gentoo).
  6. - Better support for building with Mingw.
  7. - cstool has new option -s to turn on skipdata mode.
  8. - cstool -v now report build settings of the core.
  9. - Add suite/capstone_get_setup.c so users can integrate with their own code
  10. to retrieve Capstone settings at build time.
  11. [ Arm ]
  12. - Fix 4.0 regression: the `tbh [r0, r1, lsl #1]` instruction sets the operand.shift.value back again (see #1317)
  13. - Remove ARM_REG_PC group for BX instruction.
  14. [ X86 ]
  15. - Fix: endbr32 and endbr64 instructions are now properly decoded in both CS_MODE_32 and CS_MODE_64 (#1129)
  16. [ M680X ]
  17. - Fix some issues reported by clang-analyzer (#1329).
  18. [ Python ]
  19. - Fix skipdata setup.
  20. - Add getter/setter for skipdata_mnem, skipdata_callback.
  21. ---------------------------------
  22. Version 4.0: December 18th, 2018
  23. [ Core ]
  24. - New APIs: cs_regs_access()
  25. - Add new options for cs_option(): CS_OPT_MNEMONIC & CS_OPT_UNSIGNED & CS_OPT_SYNTAX_MASM.
  26. - Various updates & bugfixes for all architectures.
  27. - Add 4 new architectures: EVM, M68K, M680X & TMS320C64x.
  28. - Add new group types: CS_GRP_PRIVILEGE & CS_GRP_BRANCH_RELATIVE.
  29. - Add new error types: CS_ERR_X86_MASM.
  30. [ X86 ]
  31. - Add XOP code condition type in x86_xop_cc.
  32. - Add some info on encoding to cs_x86 in cs_x86_encoding.
  33. - Add register flags update in cs_x86.{eflags, fpu_flags}
  34. - Change cs_x86.disp type from int32_t to int64_t.
  35. - Add new groups: X86_GRP_VM & X86_GRP_FPU.
  36. - Lots of new instructions (AVX)
  37. [ ARM64 ]
  38. - Add instruction ARM64_INS_NEGS & ARM64_INS_NGCS.
  39. [ Mips ]
  40. - Add mode CS_MODE_MIPS2.
  41. [ PPC ]
  42. - Change cs_ppc_op.imm type from int32_t to int64_t.
  43. - Add new groups: PPC_GRP_ICBT, PPC_GRP_P8ALTIVEC, PPC_GRP_P8VECTOR & PPC_GRP_QPX.
  44. - Lots of new instructions (QPX among them)
  45. [ Sparc ]
  46. - Change cs_sparc_op.imm type from int32_t to int64_t.
  47. [ Binding ]
  48. - New bindings: PowerShell & VB6
  49. ---------------------------------
  50. Version 3.0.5: July 18th, 2018
  51. [ Core ]
  52. - Fix the include path for Android builds when building cstool.
  53. - Add posibility to disable universal build for Mac OS.
  54. - cstool: Separate instruction bytes by spaces.
  55. - Fix code path of pkg-config in Cmake.
  56. - Update XCode project for XCode 9.1.
  57. - Add Cortex-M support to cstool.
  58. - Cmake forces to be build using MT with MSVC.
  59. - Better support for Mac OS kernel.
  60. [ X86 ]
  61. - Fix some issues in handling EVEX & VEX3 instructions.
  62. - Fix immediate operand for AND instruction in ATT mode.
  63. - Fix ATT syntax when imm operand is 0.
  64. - Better handle XACQUIRE/XRELEASE.
  65. - Fix imm operand of RETF.
  66. [ ARM ]
  67. - Fix an integer overlow bug.
  68. [ ARM64 ]
  69. - Bug fix for incorrect operand type in certain load/store instructions.
  70. [ Mips ]
  71. - Mode CS_MODE_MIPS32R6 automatically sets CS_MODE_32
  72. [ PPC ]
  73. - Fix endian check.
  74. [ Sparc ]
  75. - Fix an integer overlow bug.
  76. [ SystemZ ]
  77. - Fix an integer overlow bug.
  78. [ Python binding ]
  79. - Raise error on accessing irrelevant data fields if skipdata & detail modes are enable.
  80. ---------------------------------
  81. Version 3.0.5-rc3: July 31st, 2017
  82. [ Core ]
  83. - Fix compilation for MacOS kernel extension
  84. - cstool to support armbe and arm64be modes
  85. - Add nmake.bat for Windows build
  86. - Fix an integer overflow for Windows kernel driver
  87. - Support to embedded Capstone into MacOS kernel
  88. - cstool: fix mips64 mode
  89. - Fix a compiling error in MS Visual Studio 2015
  90. - Install pkgconfig file with CMake build
  91. - Fix SOVERSION property of CMake build
  92. - Properly handle switching to Endian mode at run-time for Arm, Arm64, Mips & Sparc
  93. - Fix MingW build
  94. - Better handle CMake installation for Linux 64bit
  95. [ X86 ]
  96. - Support BND prefix of Intel MPX extension
  97. - Correct operand size for CALL/JMP in 64bit mode with prefix 0x66
  98. - LOCK NOP is a valid instruction
  99. - Fix ATT syntax for instruction with zero offset segment register
  100. - LES/LDS are invalid in 64bit mode
  101. - Fix number of operands for some MOV instructions
  102. [ ARM ]
  103. - Fix POP reg to update SP register
  104. - Update flags for UADD8 instruction
  105. [ ARM64 ]
  106. - Better performance with new lookup table
  107. - Handle system registers added in ARMv8.1/2
  108. [ Java binding ]
  109. - Better handle input with invalid code
  110. [ Visual Basic binding ]
  111. - New binding
  112. ---------------------------------
  113. Version 3.0.5-rc2: March 2nd, 2017
  114. [ Core ]
  115. - Fix build for Visual Studio 2012
  116. - Fix X86_REL_ADDR macro
  117. - Add CS_VERSION_MAJOR, CS_VERSION_MINOR, CS_VERSION_EXTRA
  118. - Better support for embedding Capstone into Windows kernel drivers
  119. - Support to embedded Capstone into MacOS kernel
  120. - Support MacOS 10.11 and up
  121. - Better support for Cygwin
  122. - Support build packages for FreeBSD & DragonflyBSD
  123. - Add a command-line tool "cstool"
  124. - Properly handle switching to Endian mode at run-time for Arm, Arm64, Mips & Sparc
  125. [ X86 ]
  126. - Some random 16-bit code can be handled wrongly.
  127. - Remove abundant operand type X86_OP_FP
  128. - Fix instructions MOVQ, LOOP, LOOPE, LOOPNE, CALL/JMP rel16, REPNE LODSD, MOV *AX, MOFFS, FAR JMP/CALL
  129. - Add X86_REG_EFLAGS for STC and STD
  130. - Fix instruction attributes for SYSEXIT, MOVW, ROL, LGS, SLDT
  131. - Rename registers ST0-ST7 to be consistent with asm output
  132. [ ARM ]
  133. - Properly handle IT instruction
  134. - Fix LDRSB
  135. - Fix writeback for LDR
  136. - Fix Thumb BigEndian setup
  137. [ ARM64 ]
  138. - Fix arith extender
  139. - Fix writeback for LDR
  140. - Rename enum arm64_mrs_reg to arm64_sysreg
  141. [ PowerPC ]
  142. - Print 0 offset for memory operand
  143. [ Sparc ]
  144. - Fix POPC instruction
  145. [ Python binding ]
  146. - Better PyPy support
  147. - Add __version__
  148. - Better support for Python 3
  149. - Fix CS_SKIPDATA_CALLBACK prototype
  150. - Cast skipdata function inside binding to simplify the API
  151. [ Java binding ]
  152. - Better handle input with invalid code
  153. [ PowerShell ]
  154. - New binding
  155. ---------------------------------
  156. Version 3.0.4: July 15th, 2015
  157. [ Library ]
  158. - Improve cross-compile for Android using Android NDK.
  159. - Support cross-compile for AArch64 Android (with Linux GCC).
  160. - Removed osxkernel_inttypes.h that is incompatible with BSD license.
  161. - Make it possible to compile with CC having a space inside (like "ccache gcc").
  162. [ X86 ]
  163. - Fix a null pointer dereference bug on handling code with special prefixes.
  164. - Properly handle AL/AX/EAX operand for OUT instruction in AT&T syntax.
  165. - Print immediate operand in positive form in some algorithm instructions.
  166. - Properly decode some SSE instructions.
  167. [ PowerPC ]
  168. - Fixed a memory corruption bug.
  169. - Fixed a memory corruption bug for the engine built in DIET mode.
  170. [ Mips ]
  171. - Fixed instruction ID of SUBU instruction.
  172. - Fixed a memory corruption bug.
  173. [ Arm ]
  174. - Fixed a memory corruption bug on IT instruction.
  175. [ XCore ]
  176. - Fixed a memory corruption bug when instruction has a memory operand.
  177. [ Python ]
  178. - Support Virtualenv.
  179. - setup.py supports option --user if not in a virtualenv to allow for local usage.
  180. - Properly handle the destruction of Cs object in the case the shared library
  181. was already unloaded.
  182. ---------------------------------
  183. Version 3.0.3: May 08th, 2015
  184. [ Library ]
  185. - Support to embed into Mac OS X kernel extensions.
  186. - Now it is possible to compile Capstone with older C compilers, such as
  187. GCC 4.8 on Ubuntu 12.04.
  188. - Add "test_iter" to MSVC project.
  189. [ X86 ]
  190. - All shifted instructions SHL, SHR, SAL, SAR, RCL, RCR, ROL & ROR now support
  191. $1 as first operand in *AT&T* syntax (so we have "rcll $1, %edx" instead of
  192. "rcll %edx").
  193. - CMPXCHG16B is a valid instruction with LOCK prefix.
  194. - Fixed a segfault on the input of 0xF3.
  195. [ Arm ]
  196. - BLX instruction modifies PC & LR registers.
  197. [ Sparc ]
  198. - Improved displacement decoding for sparc banching instructions.
  199. [ Python binding ]
  200. - Fix for Cython so it can properly initialize.
  201. - X86Op.avx_zero_mask now has c_bool type, but not c_uint8 type.
  202. - Properly support compile with Cygwin & install binding (setup.py).
  203. ---------------------------------
  204. Version 3.0.2: March 11th, 2015
  205. [ Library ]
  206. - On *nix, only export symbols that are part of the API (instead of all
  207. the internal symbols).
  208. [ X86 ]
  209. - Do not consider 0xF2 as REPNE prefix if it is a part of instruction encoding.
  210. - Fix implicit registers read/written & instruction groups of some instructions.
  211. - More flexible on the order of prefixes, so better handle some tricky
  212. instructions.
  213. - REPNE prefix can go with STOS & MOVS instructions.
  214. - Fix a compilation bug for X86_REDUCE mode.
  215. - Fix operand size of instructions with operand PTR []
  216. [ Arm ]
  217. - Fix a bug where arm_op_mem.disp is wrongly calculated (in DETAIL mode).
  218. - Fix a bug on handling the If-Then block.
  219. [ Mips ]
  220. - Sanity check for the input size for MIPS64 mode.
  221. [ MSVC ]
  222. - Compile capstone.dll with static runtime MSVCR built in.
  223. [ Python binding ]
  224. - Fix a compiling issue of Cython binding with gcc 4.9.
  225. ---------------------------------
  226. Version 3.0.1: February 03rd, 2015
  227. [ X86 ]
  228. - Properly handle LOCK, REP, REPE & REPNE prefixes.
  229. - Handle undocumented immediates for SSE's (V)CMPPS/PD/SS/SD instructions.
  230. - Print LJUMP/LCALL without * as prefix for Intel syntax.
  231. - Handle REX prefix properly for segment/MMX related instructions (x86_64).
  232. - Instruction with length > 15 is consider invalid.
  233. - Handle some tricky encodings for instructions MOVSXD, FXCH, FCOM, FCOMP,
  234. FSTP, FSTPNCE, NOP.
  235. - Handle some tricky code for some X86_64 instructions with REX prefix.
  236. - Add missing operands in detail mode for PUSH , POP , IN/OUT reg, reg
  237. - MOV32ms & MOV32sm should reference word rather than dword.
  238. [ Arm64 ]
  239. - BL & BLR instructions do not read SP register.
  240. - Print absolute (rather than relative) address for instructions B, BL,
  241. CBNZ, ADR.
  242. [ Arm ]
  243. - Instructions ADC & SBC do not update flags.
  244. - BL & BLX do not read SP, but PC register.
  245. - Alias LDR instruction with operands [sp], 4 to POP.
  246. - Print immediate operand of MVN instruction in positive hexadecimal form.
  247. [ PowerPC ]
  248. - Fix some compilation bugs when DIET mode is enable.
  249. - Populate SLWI/SRWI instruction details with SH operand.
  250. [ Python binding ]
  251. - Fix a Cython bug when CsInsn.bytes returns a shorten array of bytes.
  252. - Fixed a memory leak for Cython disasm functions when we immaturely quit
  253. the enumeration of disassembled instructions.
  254. - Fix a NULL memory access issue when SKIPDATA & Detail modes are enable
  255. at the same time.
  256. - Fix a memory leaking bug when when we stop enumeration over the disassembled
  257. instructions prematurely.
  258. - Export generic operand types & groups (CS_OP_xxx & CS_GRP_xxx).
  259. ---------------------------------
  260. Version 3.0: November 19th, 2014
  261. [ API ]
  262. - New API: cs_disasm_iter & cs_malloc. See docs/README for tutorials.
  263. - Renamed cs_disasm_ex to cs_disasm (cs_disasm_ex is still supported, but
  264. marked obsolete to be removed in future)
  265. - Support SKIPDATA mode, so Capstone can jump over unknown data and keep going
  266. from the next legitimate instruction. See docs/README for tutorials.
  267. - More details provided in cs_detail struct for all architectures.
  268. - API version was bumped to 3.0.
  269. [ Bindings ]
  270. - Python binding supports Python3 (besides Python2).
  271. - Support Ocaml binding.
  272. - Java: add close() method to be used to deinitialize a Capstone object when
  273. no longer use it.
  274. [ Architectures ]
  275. - New architectures: Sparc, SystemZ & XCore.
  276. - Important bugfixes for Arm, Arm64, Mips, PowerPC & X86.
  277. - Support more instructions for Arm, Arm64, Mips, PowerPC & X86.
  278. - Always expose absolute addresses rather than relative addresses (Arm, Arm64,
  279. Mips, PPC, Sparc, X86).
  280. - Use common instruction operand types REG, IMM, MEM & FP across all
  281. architectures (to enable cross-architecture analysis).
  282. - Use common instruction group types across all architectures (to enable
  283. cross-architecture analysis).
  284. [ X86 ]
  285. - X86 engine is mature & handles all the malware tricks (that we are aware of).
  286. - Added a lot of new instructions (such as AVX512, 3DNow, etc).
  287. - Add prefix symbols X86_PREFIX_REP/REPNE/LOCK/CS/DS/SS/FS/GS/ES/OPSIZE/ADDRSIZE.
  288. - Print immediate in positive form & hexadecimal for AND/OR/XOR instructions.
  289. - More friendly disassembly for JMP16i (in the form segment:offset)
  290. [ Mips ]
  291. - Engine added supports for new hardware modes: Mips32R6 (CS_MODE_MIPS32R6) &
  292. MipsGP64 (CS_MODE_MIPSGP64).
  293. - Removed the ABI-only mode CS_MODE_N64.
  294. - New modes CS_MODE_MIPS32 & CS_MODE_MIPS64 (to use instead of CS_MODE_32 &
  295. CS_MODE_64).
  296. [ ARM ]
  297. - Support new mode CS_MODE_V8 for Armv8 A32 encodings.
  298. - Print immediate in positive form & hexadecimal for AND/ORR/EOR/BIC instructions
  299. [ ARM64 ]
  300. - Print immediate in hexadecimal for AND/ORR/EOR/TST instructions.
  301. [ PowerPC ]
  302. - Do not print a dot in front of absolute address.
  303. [ Other features ]
  304. - Support for Microsoft Visual Studio (so enable Windows native compilation).
  305. - Support CMake compilation.
  306. - Cross-compile for Android.
  307. - Build libraries/tests using XCode project
  308. - Much faster, while consuming less memory for all architectures.
  309. ---------------------------------
  310. Version 2.1.2: April 3rd, 2014
  311. This is a stable release to fix some bugs deep in the core. There is no update
  312. to any architectures or bindings, so bindings version 2.1 can be used with this
  313. version 2.1.2 just fine.
  314. [ Core changes]
  315. - Support cross-compilation for all iDevices (iPhone/iPad/iPod).
  316. - X86: do not print memory offset in negative form.
  317. - Fix a bug in X86 when Capstone cannot handle short instruction.
  318. - Print negative number above -9 without prefix 0x (arm64, mips, arm).
  319. - Correct the SONAME setup for library versioning (Linux, *BSD, Solaris).
  320. - Set library versioning for dylib of OSX.
  321. ---------------------------------
  322. Version 2.1.1: March 13th, 2014
  323. This is a stable release to fix some bugs deep in the core. There is no update
  324. to any architectures or bindings, so bindings version 2.1 can be used with this
  325. version 2.1.1 just fine.
  326. [ Core changes]
  327. - Fix a buffer overflow bug in Thumb mode (ARM). Some special input can
  328. trigger this flaw.
  329. - Fix a crash issue when embedding Capstone into OSX kernel. This should
  330. also enable Capstone to be embedded into other systems with limited stack
  331. memory size such as Linux kernel or some firmwares.
  332. - Use a proper SONAME for library versioning (Linux).
  333. ---------------------------------
  334. Version 2.1: March 5th, 2014
  335. [ API changes ]
  336. - API version has been bumped to 2.1.
  337. - Change prototype of cs_close() to be able to invalidate closed handle.
  338. See http://capstone-engine.org/version_2.1_API.html for more information.
  339. - Extend cs_support() to handle more query types, not only about supported
  340. architectures. This change is backward compatible, however, so existent code
  341. do not need to be modified to support this.
  342. - New query type CS_SUPPORT_DIET for cs_support() to ask about diet status of
  343. the engine.
  344. - New error code CS_ERR_DIET to report errors about newly added diet mode.
  345. - New error code CS_ERR_VERSION to report issue of incompatible versions between
  346. bindings & core engine.
  347. [ Core changes ]
  348. - On memory usage, Capstone uses about 40% less memory, while still faster
  349. than version 2.0.
  350. - All architectures are much smaller: binaries size reduce at least 30%.
  351. Especially, X86-only binary reduces from 1.9MB to just 720KB.
  352. - Support "diet" mode, in which engine size is further reduced (by around 40%)
  353. for embedding purpose. The price to pay is that we have to sacrifice some
  354. non-critical data fields. See http://capstone-engine.org/diet.html for more
  355. details.
  356. [ Architectures ]
  357. - Update all 5 architectures to fix bugs.
  358. - PowerPC:
  359. - New instructions: FMR & MSYNC.
  360. - Mips:
  361. - New instruction: DLSA
  362. - X86:
  363. - Properly handle AVX-512 instructions.
  364. - New instructions: PSETPM, SALC, INT1, GETSEC.
  365. - Fix some memory leaking issues in case of prefixed instructions such
  366. as LOCK, REP, REPNE.
  367. [ Python binding ]
  368. - Verify the core version at initialization time. Refuse to run if its version
  369. is different from the core's version.
  370. - New API disasm_lite() added to Cs class. This light API only returns tuples of
  371. (address, size, mnemonic, op_str), rather than list of CsInsn objects. This
  372. improves performance by around 30% in some benchmarks.
  373. - New API version_bind() returns binding's version, which might differ from
  374. the core's API version if the binding is out-of-date.
  375. - New API debug() returns information on Cython support, diet status & archs
  376. compiled in.
  377. - Fixed some memory leaking bugs for Cython binding.
  378. - Fix a bug crashing Cython code when accessing @regs_read/regs_write/groups.
  379. - Support diet mode.
  380. [ Java binding ]
  381. - Fix some memory leaking bugs.
  382. - New API version() returns combined version.
  383. - Support diet mode.
  384. - Better support for detail option.
  385. [ Miscellaneous ]
  386. - make.sh now can uninstall the core engine. This is done with:
  387. $ sudo ./make.sh uninstall
  388. ----------------------------------
  389. Version 2.0: January 22nd, 2014
  390. Release 2.0 deprecates verison 1.0 and brings a lot of crucial changes.
  391. [ API changes ]
  392. - API version has been bumped to 2.0 (see cs_version() API)
  393. - New API cs_strerror(errno) returns a string describing error code given
  394. in its only argument.
  395. - cs_version() now returns combined version encoding both major & minor versions.
  396. - New option CS_OPT_MODE allows to change engine’s mode at run-time with
  397. cs_option().
  398. - New option CS_OPT_MEM allows to specify user-defined functions for dynamically
  399. memory management used internally by Capstone. This is useful to embed Capstone
  400. into special environments such as kernel or firware.
  401. - New API cs_support() can be used to check if this lib supports a particular
  402. architecture (this is necessary since we now allow to choose which architectures
  403. to compile in).
  404. - The detail option is OFF by default now. To get detail information, it should be
  405. explicitly turned ON. The details then can be accessed using cs_insn.detail
  406. pointer (to newly added structure cs_detail)
  407. [ Core changes ]
  408. - On memory usage, Capstone uses much less memory, but a lot faster now.
  409. - User now can choose which architectures to be supported by modifying config.mk
  410. before compiling/installing.
  411. [ Architectures ]
  412. - Arm
  413. - Support Big-Endian mode (besides Little-Endian mode).
  414. - Support friendly register, so instead of output sub "r12,r11,0x14",
  415. we have "sub ip,fp,0x14".
  416. - Arm64: support Big-Endian mode (besides Little-Endian mode).
  417. - PowerPC: newly added.
  418. - Mips: support friendly register, so instead of output "srl $2,$1,0x1f",
  419. we have "srl $v0,$at,0x1f".
  420. - X86: bug fixes.
  421. [ Python binding ]
  422. - Python binding is vastly improved in performance: around 3 ~ 4 times faster
  423. than in 1.0.
  424. - Cython support has been added, which can further speed up over the default
  425. pure Python binding (up to 30% in some cases)
  426. - Function cs_disasm_quick() & Cs.disasm() now use generator (rather than a list)
  427. to return succesfully disassembled instructions. This improves the performance
  428. and reduces memory usage.
  429. [ Java binding ]
  430. - Better performance & bug fixes.
  431. [ Miscellaneous ]
  432. - Fixed some installation issues with Gentoo Linux.
  433. - Capstone now can easily compile/install on all *nix, including Linux, OSX,
  434. {Net, Free, Open}BSD & Solaris.
  435. ----------------------------------
  436. [Version 1.0]: December 18th, 2013
  437. - Initial public release.