Commit Graph

140 Commits

Author SHA1 Message Date
Catena cyber
5a671cd756 Use whole corpus for regression testing (#1302)
* Use whole corpus for regression testing

* differetial fuzzing against llvm-mc

* Download corpus from another repo
2018-12-11 09:33:31 +07:00
Catena cyber
8ffcff1114 Continuous integration for fuzzing (#1297)
* Continuous integration for fuzzing

* Simplify fuzz testing output

* Makefile for suite fuzz

* fixup

* Code review taken into acount

* More readable fuzz harness

Inputs specify only on first line the mode
2018-12-04 15:02:16 +07:00
Catena cyber
26aae877dc Avoids memory leak with fuzz driver (#1233) 2018-08-27 07:57:27 +07:00
Nguyen Anh Quynh
76c1c3c4e9 merge next to master 2018-07-20 12:36:50 +08:00
Catena cyber
b22f425799 Builds a test corpus for fuzzing (#1184)
* Limit size of inputs for fuzz targets

* Build a test corpus for fuzzing
2018-06-19 09:31:50 +08:00
Catena cyber
d2e82d0c44 Builds a test corpus for fuzzing (#1174)
Modifies the list of architectures and modes fuzzed
2018-06-13 22:58:40 +01:00
Catena cyber
41da47b213 Adds a size limit for inputs to fuzz target (#1167) 2018-06-07 01:40:47 +08:00
Catena cyber
e42083410b Fuzz next branch (#1152) 2018-06-01 22:30:53 +08:00
Catena cyber
883b2042bf Integrate capstone with oss-fuzz (#1150)
Compile the fuzz target with the rest of the tests
2018-06-01 20:47:19 +08:00
Catena cyber
61b6ce5fad Integrate capstone with oss-fuzz (#1150)
Compile the fuzz target with the rest of the tests
2018-06-01 20:46:20 +08:00
Wolfgang Schwotzer
e8d1f1d4d2 M680X: Target ready for pull request (#1034)
* Added new M680X target. Supports M6800/1/2/3/9, HD6301

* M680X: Reformat for coding guide lines. Set alphabetical order in HACK.TXT

* M680X: Prepare for python binding. Move cs_m680x, m680x_insn to m680x_info. Chec
> k cpu type, no default.

* M680X: Add python bindings. Added python tests.

* M680X: Added cpu types to usage message.

* cstool: Avoid segfault for invalid <arch+mode>.

* Make test_m680x.c/test_m680x.py output comparable (diff params: -bu). Keep xprint.py untouched.

* M680X: Update CMake/make for m680x support. Update .gitignore.

* M680X: Reduce compiler warnings.

* M680X: Reduce compiler warnings.

* M680X: Reduce compiler warnings.

* M680X: Make test_m680x.c/test_m680x.py output comparable (diff params: -bu).

* M680X: Add ocaml bindings and tests.

* M680X: Add java bindings and tests.

* M680X: Added tests for all indexed addressing modes. C/Python/Ocaml

* M680X: Naming, use page1 for PAGE1 instructions (without prefix).

* M680X: Naming, use page1 for PAGE1 instructions (without prefix).

* M680X: Used M680X_FIRST_OP_IN_MNEM in tests C/python/java/ocaml.

* M680X: Added access property to cs_m680x_op.

* M680X: Added operand size.

* M680X: Remove compiler warnings.

* M680X: Added READ/WRITE access property per operator.

* M680X: Make reg_inherent_hdlr independent of CPU type.

* M680X: Add HD6309 support + bug fixes

* M680X: Remove errors and warning.

* M680X: Add Bcc/LBcc to group BRAREL (relative branch).

* M680X: Add group JUMP to BVS/BVC/LBVS/LBVC. Remove BRAREL from BRN/LBRN.

* M680X: Remove LBRN from group BRAREL.

* M680X: Refactored cpu_type initialization for better readability.

* M680X: Add two operands for insn having two reg. in mnemonic. e.g. ABX.

* M680X: Remove typo in cstool.c

* M680X: Some format improvements in changed_regs.

* M680X: Remove insn id string list from tests (C/python/java/ocaml).

* M680X: SEXW, set access of reg. D to WRITE.

* M680X: Sort changed_regs in increasing m680x_insn order.

* M680X: Add M68HC11 support + Reduced from two to one INDEXED operand.

* M680X: cstool, also write '(in mnemonic)' for second reg. operand.

* M680X: Add BRN/LBRN to group JUMP and BRAREL.

* M680X: For Bcc/LBcc/BRSET/BRCLR set reg. CC to read access.

* M680X: Correctly print negative immediate values with option CS_OPT_UNSIGNED.

* M680X: Rename some instruction handlers.

* M680X: Add M68HC05 support.

* M680X: Dont print prefix '<' for direct addr. mode.

* M680X: Add M68HC08 support + resorted tables + bug fixes.

* M680X: Add Freescale HCS08 support.

* M680X: Changed group names, avoid spaces.

* M680X: Refactoring, rename addessing mode handlers.

* M680X: indexed addr. mode, changed pre/post inc-/decrement representation.

* M680X: Rename some M6809/HD6309 specific functions.

* M680X: Add CPU12 (68HC12/HCS12) support.

* M680X: Correctly display illegal instruction as FCB .

* M680X: bugfix: BRA/BRN/BSR/LBRA/LBRN/LBSR does not read CC reg.

* M680X: bugfix: Correctly check for sufficient code size for M6809 indexed addressing.

* M680X: Better support for changing insn id within handler for addessing mode.

* M680X: Remove warnings.

* M680X: In set_changed_regs_read_write_counts use own access_mode.

* M680X: Split cpu specific tables into separate *.inc files.

* M680X: Remove warnings.

* M680X: Removed address_mode. Addressing mode is available in operand.type

* M680X: Bugfix: BSET/BCLR/BRSET/BRCLR correct read/modify CC reg.

* M680X: Remove register TMP1. It is first visible in CPU12X.

* M680X: Performance improvement + bug fixes.

* M680X: Performance improvement, make cpu_tables const static.

* M680X: Simplify operand decoding by using two handlers.

* M680X: Replace M680X_OP_INDEX by M680X_OP_CONSTANT + bugfix in java/python/ocaml bindings.

* M680X: Format with astyle.

* M680X: Update documentation.

* M680X: Corrected author for m680x specific files.

* M680X: Make max. number of architectures single source.
2017-10-21 21:44:36 +08:00
semihalf-oleksy-michalina
de6666c531 arm64: handling of system registers added in ARMv8.1/2 (#960)
* arm64: handling of system registers added in ARMv8.2

This commit adds handling of system registers added in ARMv8.2.
Those registers are accessed by mrs and msr instructions.
Changes based on https://static.docs.arm.com/ddi0487/b/DDI0487B_a_armv8_arm.pdf, chapters D7.2-5.

List of added registers:
id_mmfr4_el1
id_aa64mmfr2_el1
sctlr_el12
cpacr_el12
ttbr0_el12
ttbr1_el12
ttbr1_el2
tcr_el12
spsr_el12
elr_el12
afsr0_el12
afsr1_el12
esr_el12
far_el12
mair_el12
amair_el12
vbar_el12
cntkctl_el12
cnthv_ctl_el2
cnthv_cval_el2
cnthv_tval_el2
cntp_tval_el02
cntp_cval_el02
cntv_ctl_el02
ntv_cval_el02
cntv_tval_el02
lorid_el1
lorc_el1
lorea_el1
lorn_el1
lorsa_el1
contextidr_el12

sign-of: Michalina Oleksy (https://github.com/layika)

* arm64: handling of system registers added in ARMv8.1/2

v8.1:
PAN (https://static.docs.arm.com/ddi0487/b/DDI0487B_a_armv8_arm.pdf, page 358)
PAN (as pstate field)
contextdir_el2

v8.2:
UAO (https://static.docs.arm.com/ddi0487/b/DDI0487B_a_armv8_arm.pdf, page 403)
UAO (as pstate field)

* arm64: handling of system registers for statistical profiling

Added handling of system registers for statistical profiling extension based on https://static.docs.arm.com/ddi0586/a/DDI0586A_Statistical_Profiling_Extension.pdf

* Update AArch64BaseInfo.h

* arm64: An attempt to fix indentation
2017-07-29 18:27:32 +08:00
Nguyen Anh Quynh
58c7e68ee5 suite: add disasm_mc.{py,sh} 2017-05-16 18:15:02 +07:00
Ruslan Kabatsayev
6c002ed998 Test suite update (#926)
* Add 66-prefixed versions of GDT/IDT-related instructions to tests

* Make tests suite for string instructions complete, i.e. have all the combinations of prefixes
2017-05-12 07:05:11 +07:00
mrexodia
9e478e56ab added regression test for issue #702 2016-12-16 18:43:51 +01:00
mrexodia
7a0b6374fe fixed issue #726 (snprintf undefined in test_arm_regression) 2016-09-15 23:30:24 +07:00
mrexodia
b3e1f351cc fixed issue #726 (snprintf undefined in test_arm_regression) 2016-09-15 15:58:05 +02:00
Nguyen Anh Quynh
e3f94ac4ab fix merging conflict 2016-05-22 08:58:33 +08:00
tandasat
d4ef430b33 port Windows driver support 2016-05-11 21:48:32 -07:00
Zach Riggle
1b3f07ad12 Add MIPS_GRP_XXX aliases for generic types. 2016-05-03 07:30:31 -07:00
Nguyen Anh Quynh
3f461adae3 remove myinttypes.h 2016-04-26 09:47:30 +08:00
Nguyen Anh Quynh
8d48487df3 suite: add regress/ 2016-03-10 12:37:25 +08:00
Nguyen Anh Quynh
6b3a1f4e7d fix a MSVC 2015 warning 2016-03-08 11:38:00 +08:00
Nguyen Anh Quynh
7654a68fa2 fix the last fix 2016-03-08 11:11:20 +08:00
Nguyen Anh Quynh
017267e0ea fix some MSVC warnings 2016-03-08 11:08:20 +08:00
practicalswift
cdc8d5e4de Add Makefile to suite/regress/ directory. 2015-11-18 21:36:39 +01:00
practicalswift
beb585960d Add crash case: "Invalid read of size 4" in printOperand(…) 2015-11-17 23:44:29 +01:00
Daniel Collin
2ee675c10a This adds M68K support to Capstone 2015-10-02 20:47:00 +02:00
Nguyen Anh Quynh
caf8ddaae8 fix conflicts 2015-09-30 11:07:22 +08:00
bughoho
fe19541d7e test cs_disasm_iter benchmark 2015-09-30 11:05:41 +08:00
Nguyen Anh Quynh
fee75fc3b9 fix an warning in test_iter_benchmark.c 2015-09-30 10:51:22 +08:00
bughoho
570f13d3a9 test cs_disasm_iter benchmark 2015-09-29 15:07:48 +08:00
Nguyen Anh Quynh
4337a77064 x86: fix issue #470 & #471 reported by Ruslan Kabatsayev 2015-09-08 22:14:35 +08:00
Ruslan Kabatsayev
f86a8d58cc Add GDT/IDT handling instructions to tests 2015-09-08 16:06:48 +03:00
Nguyen Anh Quynh
850dcdb539 suite: add verbose output mode to regress.py 2015-08-24 20:53:43 +08:00
Nguyen Anh Quynh
87b71edf4d suite: add verbose output mode to regress.py 2015-08-24 20:53:26 +08:00
Ruslan Kabatsayev
53181677f5 Add tests for x86 string instructions 2015-08-24 20:34:59 +08:00
Ruslan Kabatsayev
47fa5972f9 Add tests for x86 string instructions 2015-08-23 19:50:52 +03:00
Nguyen Anh Quynh
343a98d8a4 suite: add regress.py 2015-08-19 09:35:27 +08:00
Nguyen Anh Quynh
46e7a68428 suite: add regress.py 2015-08-19 09:34:33 +08:00
learn_more
07a7f6c8aa Add missing const for arm64
update suite/test_group_name
2015-08-02 14:21:55 +02:00
Nguyen Anh Quynh
fec23ae531 fix autogen_x86imm.py to handle some special instructions. this fixed issue #411 reported by @pancake 2015-06-30 20:49:55 +08:00
Nguyen Anh Quynh
de6fa911b5 skip _LOCK_ instructions for augoten_x86.imm.py 2015-06-28 13:14:36 +08:00
Nguyen Anh Quynh
de8dd26780 x86: handle operand size properly for immediate operands 2015-06-28 12:18:13 +08:00
Nguyen Anh Quynh
7bb3508ccb suite: move fuzz_hardness.c to suite/fuzz/ 2015-06-16 17:37:48 +08:00
Nguyen Anh Quynh
0dbf1b9636 suite: move fuzz_hardness.c to suite/fuzz/ 2015-06-16 17:32:03 +08:00
Nguyen Anh Quynh
7574ed9802 suite: add python_capstone_setup.py 2015-06-07 15:55:05 +08:00
Nguyen Anh Quynh
67304f36a3 suite: add python_capstone_setup.py 2015-05-10 10:23:27 +08:00
Nguyen Anh Quynh
5a6007b0f1 suite: correct authors of patch_major_os_version.py 2015-05-06 10:40:20 +08:00
Nguyen Tan Cong
fd1af772e2 add script to MajorOperatingSystemVersion and MajorSubsystemVersion in PE header from 6 to 5 2015-05-06 10:40:10 +08:00