Commit Graph

1277 Commits

Author SHA1 Message Date
Nguyen Anh Quynh
72ba554738 qemu_thread_join() takes only 1 arg 2016-04-23 10:17:04 +08:00
Nguyen Anh Quynh
3a742fb6f6 fix conflicts when merging no-thread to master 2016-04-23 10:06:57 +08:00
Nguyen Anh Quynh
bb80e699b2 Merge pull request #529 from zachriggle/issue_528
Remove double-free
2016-04-21 10:23:54 +08:00
Zach Riggle
93063d089b Add ASAN build target with UNICORN_ASAN or via './make.sh asan' 2016-04-20 16:16:06 -07:00
Zach Riggle
9f94191a64 Remove double-free
This was previously released at uc_close ../uc.c:286

    if (uc->release)
        uc->release(uc->tcg_ctx);

Which effectively does:

    object_unref(uc, OBJECT(uc->root));
2016-04-20 15:34:55 -07:00
Nguyen Anh Quynh
8932463f9d arm: qutie emulation on EXCP_YIELD exception. this fixes testcase 004-segmentation_fault_1 in #520 2016-04-20 12:04:15 +08:00
Nguyen Anh Quynh
283672426e update CREDITS.TXT 2016-04-19 09:42:48 +08:00
Nguyen Anh Quynh
d2ccc27cc8 samples: fix warning on printing 64bit int in sample_batch_reg.c 2016-04-18 12:54:21 +08:00
Nguyen Anh Quynh
cc6cbc5cf7 Merge branch 'memleak' into m2 2016-04-18 12:48:13 +08:00
Nguyen Anh Quynh
a015ddc348 add link to Rust binding 2016-04-18 10:18:39 +08:00
Nguyen Anh Quynh
ba31be79f4 update qemu/powerpc.h 2016-04-17 23:37:25 +08:00
Nguyen Anh Quynh
47a7bb3c9f Merge branch 'smaller_nothreads' of https://github.com/cseagle/unicorn into cseagle-smaller_nothreads 2016-04-17 23:37:06 +08:00
Nguyen Anh Quynh
78c3f68765 update CREDITS.TXT 2016-04-10 22:47:12 +08:00
Nguyen Anh Quynh
b62a90d8a9 Merge pull request #520 from practicalswift/add-six-crashers
Add six crash cases (2 * ARM + 4 * M68K)
2016-04-10 07:15:01 +07:00
Nguyen Anh Quynh
d488691745 Merge pull request #518 from adrianherrera/haskell-improvements
Small improvements to align with hapstone (Haskell bindings for Capstone)
2016-04-10 07:11:25 +07:00
practicalswift
06a64dc3b0 Add six crash cases (2 * ARM + 4 * M68K)
* 001-bad_condition_code_0xe.c (ARM)
* 002-qemu__fatal__unimplemented_control_register_write_0xffb___0x0.c (M68K)
* 003-qemu__fatal__wdebug_not_implemented.c (M68K)
* 004-segmentation_fault_1.c (ARM)
* 005-qemu__fatal__illegal_instruction__0000___00000404.c (M68K)
* 006-qemu__fatal__illegal_instruction__0421___00040026.c (M68K)

```
$ ./001-bad_condition_code_0xe # ARM
uc_emu_start(…)
Bad condition code 0xe
Aborted

$ ./002-qemu__fatal__unimplemented_control_register_write_0xffb___0x0 # M68K
uc_emu_start(…)
hook_code(…) called
qemu: fatal: Unimplemented control register write 0xffb = 0x0

Aborted

$ ./003-qemu__fatal__wdebug_not_implemented # M68K
uc_emu_start(…)
qemu: fatal: WDEBUG not implemented
Aborted

$ ./004-segmentation_fault_1 # ARM
uc_emu_start(…)
hook_code(…) called
Segmentation fault

$ ./005-qemu__fatal__illegal_instruction__0000___00000404 # M68K
uc_emu_start(…)
qemu: fatal: Illegal instruction: 0000 @ 00000404
Aborted

$ ./006-qemu__fatal__illegal_instruction__0421___00040026 # M68K
uc_emu_start(…)
hook_code(…) called
qemu: fatal: Illegal instruction: 0421 @ 00040026
Aborted
```
2016-04-09 15:27:20 -04:00
Adrian Herrera
0a3f83a20c Small changes to align with hapstone (Haskell bindings for Capstone)
Enums now derive bounded and made use of Applicative in Utils module
2016-04-09 00:13:25 +10:00
Nguyen Anh Quynh
023e4375d0 Merge branch 'master' of https://github.com/unicorn-engine/unicorn 2016-04-08 21:42:22 +08:00
Adrian Herrera
87b65d1dda Small formatting fix 2016-04-08 23:31:13 +10:00
Adrian Herrera
b250d599b9 Removed Haskell build from Makefile - it is better to let cabal take care of this 2016-04-08 20:50:08 +10:00
Adrian Herrera
2b1454468c On second thought, you only really need to run cabal install, and that will run all the other intermediate steps for you... 2016-04-08 19:55:29 +10:00
Adrian Herrera
4cbe52a701 Updated Makefile to install bindings (in addition to building)
Updated Haskell README to explain how to build the samples
2016-04-08 19:29:43 +10:00
Nguyen Anh Quynh
b53bab1362 haskell: update .gitignore 2016-04-08 17:33:11 +08:00
Nguyen Anh Quynh
689be9356f haskell: rename TMPDIR in bindings/Makefile to TMP_DIR 2016-04-08 16:39:20 +08:00
Adrian Herrera
34a203d4c9 Updated Haskell README to make it clear that Alex and Happy are required for c2hs 2016-04-08 17:58:11 +10:00
Nguyen Anh Quynh
522ec47bf0 Merge pull request #516 from lunixbochs/go_binding_sample
Go bindings: fix HookAdd in sample
2016-04-08 09:32:37 +07:00
Ryan Hileman
20e089a774 Go bindings: fix HookAdd in sample 2016-04-07 12:09:26 -07:00
Adrian Herrera
8f43bf7ffc Improved namespacing for MMR record-style data type 2016-04-07 22:34:07 +10:00
Adrian Herrera
8cb77a2a93 Fixed Makefile build step for Haskell bindings 2016-04-07 22:27:38 +10:00
Nguyen Anh Quynh
affe94d5fe Merge pull request #513 from lunixbochs/go_binding_c99
fix Go binding C99 regression
2016-04-06 10:12:14 +07:00
Ryan Hileman
4e9dc1d8e6 fix Go binding C99 regression 2016-04-05 20:02:07 -07:00
Nguyen Anh Quynh
400f396a2a samples: code style for sample_batch_reg.c 2016-04-06 09:48:38 +08:00
Nguyen Anh Quynh
f2c99bc80e update .gitignore 2016-04-06 09:48:14 +08:00
Nguyen Anh Quynh
721f17eb74 Merge branch 'batch_reg' of https://github.com/lunixbochs/unicorn into lunixbochs-batch_reg 2016-04-06 09:39:22 +08:00
Nguyen Anh Quynh
70da2485fc x86: comment out restore_eflags() because it breaks some executions. see #505 2016-04-06 09:36:06 +08:00
Nguyen Anh Quynh
bc3e6bfc8e Merge branch 'no-restore-eflags' of https://github.com/lunixbochs/unicorn into lunixbochs-no-restore-eflags 2016-04-06 09:32:05 +08:00
Nguyen Anh Quynh
bf24a1aedf Merge pull request #511 from zachriggle/conditional
Add test showing failure to track targets properly when single-stepping.
2016-04-06 08:26:33 +07:00
Adrian Herrera
431035b335 Fixed some GHC warnings 2016-04-06 09:54:05 +10:00
Adrian Herrera
47f9a0cdac Added cabal clean, configure and build commands to the bindings Makefile
This ensures that c2hs is called when const_generator.py generates code for the
other language bindings
2016-04-06 09:51:45 +10:00
Adrian Herrera
74aaf3b321 Haskell bindings
These Haskell bindings make large use of c2hs to generate much of the code, so
Unicorn's const_generator is not used.

The emulator is based on the Either monad transformer. The IO monad is used to
run the underlying Unicorn library, while the Either monad is used to handle
errors.

Instructions on how to build the bindings are located in
bindings/haskell/README.TXT. The same samples found in samples/ can be found
in bindings/haskell/samples. They should produce the same output, with slight
differences in their error handling and messaging.
2016-04-06 09:21:36 +10:00
Zach Riggle
67ae30a2fb Add test showing failure to track targets properly when single-stepping.
This issue breaks emulation of conditional instructions on amd64.
2016-04-05 10:06:39 -07:00
Nguyen Anh Quynh
b138393a2b regress: chmod +x translator_buffer.py 2016-04-05 21:40:02 +08:00
Nguyen Anh Quynh
6ee7d22c68 Merge pull request #510 from emdel/master
test case for the dynmaic translator buffer issue
2016-04-05 20:37:52 +07:00
emdel
1120a22b4d test case for the dynmaic translator buffer issue 2016-04-05 06:11:21 -07:00
Ryan Hileman
159f9310aa add sample_batch_reg 2016-04-04 20:59:42 -07:00
Ryan Hileman
acd88856e1 add batched reg access 2016-04-04 20:51:38 -07:00
Nguyen Anh Quynh
8ee696f81d Update README.md
Change Gitter link
2016-04-05 10:09:31 +08:00
Nguyen Anh Quynh
2018c4b5d6 Merge pull request #507 from gitter-badger/gitter-badge
Add a Gitter chat badge to README.md
2016-04-05 09:02:04 +07:00
The Gitter Badger
6e6ef66b76 Add Gitter badge 2016-04-04 16:50:11 +00:00
Ryan Hileman
66619fc6cd remove call to restore_eflags (#496) 2016-04-03 23:08:17 -07:00