Commit Graph

1803 Commits

Author SHA1 Message Date
feb46abb4a Fuzz (#1000)
* Integration with oss-fuzz

* Use CFLAGS even for linking

as for fuzzing with asan

* Do not abort on uc_emu_start error

* Redirect fuzz output somewhere else than stdout

* Use uc_open for every fuzz instance

* Avoids timeouts from infinite loops

Limiting the number of instructions

* Moving fuzz to tests directory
2018-08-29 10:36:23 +08:00
0f14c47344 Makes SYSENTER hookable again on x86 (#996)
Adds SYSENTER to the whitelist of supported hookable instructions in unicorn
as well as fixes up the existing sysenter_hook_x86 regression test which was
previously failing

Fixes unicorn-engine/unicorn#995
2018-08-09 23:32:31 +08:00
84220d8360 Pascal/Delphi binding (#987)
* Pascal/Delphi binding

Pascal/Delphi language binding

* update credits
2018-08-03 20:33:25 +08:00
c7be4a2160 Haiku support patches (#989)
* Haiku: fix broken gcc strong stack protector

* qemu: Backport minor Haiku fix

We need to push this fix upstream to qemu. If we don't
get it upstreamed, i'll circle back and patch it if
Unicorn updates its qemu version.
2018-08-03 11:15:14 +08:00
e3af0d086d Merge branch 'master' of github.com:unicorn-engine/unicorn 2018-07-26 15:19:58 +08:00
1cb45fab51 MacOS: do not build in universal format by default 2018-07-28 00:19:49 +08:00
4d0157eb4a x86: fix #968. also fix potential bug of not clearing high bytes when updateing EIP 2018-07-26 15:19:23 +08:00
58e1f03f12 Revert "x86: fix #968"
This reverts commit 91033dd0f0.
2018-07-25 17:04:35 +08:00
91033dd0f0 x86: fix #968 2018-07-25 13:34:15 +08:00
86313650f9 fix some gcc warnings 2018-07-25 12:38:15 +08:00
2a240079d8 [Fix] Add feature support for CMPXCHG16B instruction. (#983) 2018-07-25 15:00:41 +08:00
cf0bcb82b4 fix invalid script path (#975) (#976)
* fix invalid script path (#975)

* expose target_page_align and target_page_size to public API.

* add newly exposed values to python binding.

* Revert "expose target_page_align and target_page_size to public API."

This reverts commit 38145bbaba26900118809c6179164d060b8e73e5.

* Revert "add newly exposed values to python binding."

This reverts commit 0884e06527155799494138733557adaf2f4fe71c.

* add python2-setuptools in required cygwin packages.

* Revert "fix invalid script path (#975)"

This reverts commit 8c55ca7d3447824fb672ab83ff4af5aee9ec089d.
2018-07-11 22:33:13 +07:00
0b3cd70e67 Update dotnet bindings (#973) 2018-07-05 21:30:33 +08:00
19ffa83d43 Fix naming in Python sample_x86.py (#961) 2018-05-07 09:44:27 +08:00
2edb4b57c4 switch appveyor to cygwin over https (#960) 2018-04-24 08:55:39 +08:00
9a01ae8379 Fix tests when using go 1.10 (#949) 2018-03-21 00:36:37 +08:00
1f408ce359 java: cleanup Makefile 2018-03-12 13:41:38 +08:00
94b1168776 Fix Java Makefile on Darwin (#936)
* Fixes the logic for Dylib extensions on macOS.
* Adds an uninstall task and documentation.
2018-03-12 20:40:40 +07:00
dab5060005 use new travis osx image and brew (#935)
saves time not to run update
2018-01-05 10:29:49 +08:00
a5e7199082 add Clojure 2017-12-23 00:32:33 +08:00
505f926992 link to Crystal binding 2017-12-23 00:26:40 +08:00
d5f83a9c2e arm: cleanup for ARM_CPU 2017-12-21 09:43:33 +08:00
41cc047b87 bindings: update after #922 2017-12-20 22:13:29 +08:00
444455de77 Merge branch 'master' of https://github.com/unicorn-engine/unicorn 2017-12-20 22:12:39 +08:00
e67be36c88 arm: remove unused variable in arm_cpu_get_phys_page_debug() 2017-12-20 22:12:35 +08:00
da5f2fc883 Fix wrong register aliases on arm64 (#922) 2017-12-20 22:09:38 +08:00
5a117c84ff add travis testing path (#930)
closes #927
2017-12-17 19:24:09 +08:00
3e0d0cfab7 i386: fix signed int overflow in #923 & #924 2017-12-16 10:28:45 +08:00
e6c27cfbd5 LGPL2 for all header files under include/unicorn/ 2017-12-16 10:08:42 +08:00
bc34c36eae version changed and unicorn.gemspec renamed to unicorn-engine.gemspec (#915) 2017-10-27 20:30:01 +08:00
8df86c86a4 changed gem name to unicorn-engine (#911)
* changed gem name to unicorn-engine

* changed the gem name in Makefile
2017-10-17 00:53:20 +08:00
4ad770b6c2 Added note about installing tests dependencies on Mac OS X. Added note about tests failing when required architecture support is disabled in build. (#908) 2017-10-12 19:56:00 +08:00
961c916a1c brew bundle changed, travis version needs update (#906) 2017-10-10 08:52:24 +08:00
f0677fc13b only build brew HEAD on master and rm trusty jobs (#904)
brew HEAD pulls from master, so it only makes sense to build on master

trusty is now the travis default, explicit jobs are no longer required
2017-10-07 23:56:02 +08:00
11c972e6db Update Brewfile
more comments for Brew
2017-09-30 17:36:44 +07:00
7f8c3ef2f6 Move to new OSX dependency management system (#900)
* Move to new OSX dependency management system

* Update Brewfile
2017-09-30 18:30:56 +08:00
d331b8f7d8 add 64-bit test demonstrating setting MSRs and FS/GS segments (#901)
* add x86_64_msr.py test demonstrating setting MSRs and FS/GS segments

* x86_64_msr.py: remove references to hooks

* x86_64_msr.py: remove references to old global variable
2017-09-29 04:26:23 +08:00
12642c2555 Cleanups/fixes for the library issue conglomerate (#897)
* Python: Disable distribution of static library on linux and macos; add environment variable LIBUNICORN_PATH to let user specify location of native library; prevent build of native library if this option is enabled; closes #869

* Python: Update README.TXT to describe how to manage the building and usage of the native library
2017-09-24 22:33:01 +08:00
13007eb12a renamed unicorn gem to unicorn-engine (#895)
* renamed gem unicorn to unicorn-engine

* renamed modules to unicornengine

* renamed Module Unicorn to UnicornEngine and the gem unicorn-engine to unicornengine

* unicornengine -> unicorn_engine
2017-09-19 07:43:21 +07:00
46ae3a042e Ruby: Support reading and writing x86 FPU stack registers (#892)
In order to reduce rounding problems from calculations, FPU stack
registers for x86 architectures contain values stored in an
80-bit extended precision format.

As a result, reading and writing to these registers requires
specific handling.

This update brings the Ruby bindings in line with the Python
bindings by supporting reading and writing the FPU stack registers
using 2-element arrays: [mantissa, exponent]

The mantissa array element contains the first 64 bits of the FPU
stack register.

The exponent array element contains the last 16 bits of the FPU
stack register.
2017-09-17 22:44:30 +07:00
f0229bd144 Fixed register mistake in comments (#894) 2017-09-17 16:40:01 +07:00
b0b5f8442d python: Fix exception in finalizer at exit (#873)
Sometimes, the finalizer for an `UcRef` runs so late that the members of the
module have already been set to `None`. We need to make sure that we don't
depend on anything in the module, or we risk getting a Exception when we try
to access the `release_handle` method of `None` (`Uc`).
2017-09-15 22:21:25 +07:00
d7735487f7 Use the qemu helpers to get/set the x86 eflags (#878) 2017-09-15 22:18:38 +07:00
363cbacee4 Only set eip to the instruction pointer after an interrupt if the interrupt was user-generated (#875) 2017-08-29 17:14:36 +07:00
a893bcf138 Changed constatns in ruby gdt example (#876)
I think those two numbers are wrong, see http://wiki.osdev.org/Global_Descriptor_Table
2017-08-29 17:03:52 +07:00
b1995b4b8a Fix C syntax mistake in test_gdt_idt_x86.c (#867)
Now 'make test' command works
2017-08-07 10:31:10 +08:00
ac9da14b3f uc_mem_unmap returns proper error code & fixes #863 (#864) 2017-08-01 18:59:55 +08:00
de7bf524f3 tests: fix mem_fuzz.c - FIXME 2017-07-23 16:33:57 +08:00
281177aa9d regress: an attempt to fix build error on mem_fuzz.c 2017-07-22 23:40:59 +08:00
42d0632108 Fix typo in ARM tcg-target.c (#859) 2017-07-22 23:36:38 +08:00