Commit Graph

2004 Commits

Author SHA1 Message Date
chfl4gs
1b4fb66138 make header for make related builds (#1268)
* Travis-CI Migration (#1230)

* Travis-CI Migration

* Travis-CI addition cmake Linux

* Travis-CI cmake fix

* Travis-CI Arm64 build

* make header for make related build
2020-05-27 16:42:51 +08:00
Nguyen Anh Quynh
132d97dfea cmake supports PPC. TODO: msvc/unicorn/ppc-softmmu is still missing 2020-05-27 16:33:08 +08:00
Nguyen Anh Quynh
f77bdb3c7e ppc: remove unused files 2020-05-27 15:53:51 +08:00
Nguyen Anh Quynh
90ed828e90 unicorn.h: PPC32 mode is supported 2020-05-27 15:33:35 +08:00
Nguyen Anh Quynh
8cbbf3df42 powerpc: chmod -x source files 2020-05-27 15:32:14 +08:00
Nguyen Anh Quynh
ad1d9156f3 chmod -x for PPC files 2020-05-27 15:17:39 +08:00
Nguyen Anh Quynh
02047d7645 update bindings 2020-05-27 15:04:42 +08:00
Nguyen Anh Quynh
d5d513d9f1 bump version to 1.0.3 2020-05-27 14:50:07 +08:00
Nguyen Anh Quynh
17e7c80eba cleanup & fix qemu/header_gen.py 2020-05-27 14:43:12 +08:00
Nguyen Anh Quynh
5b25f3f53e Merge branch 'master' of https://github.com/simigo79/unicorn-ppc into next 2020-05-27 14:02:32 +08:00
Simon Gorchakov
7e66419c03 Fixed more warnings. 2020-05-26 22:00:29 +03:00
Catena cyber
71a4ab4a6f
Removes some bugs found by oss-fuzz (#1266)
Leak on breakpoints
Undefined shift in ARM
2020-05-26 20:52:40 +08:00
Nguyen Anh Quynh
a143929942 ready for 1.0.2-rc4 2020-05-26 18:02:33 +08:00
Simon Gorchakov
0e8b6a8bba Fixed warnings. 2020-05-25 23:28:25 +03:00
BrunoPujos
6cad700b69
fix recursive UC_HOOK_MEM callbacks for cross pages access (#1113)
Co-authored-by: bruno <bruno>
Co-authored-by: Nguyen Anh Quynh <aquynh@gmail.com>
2020-05-25 16:22:28 +08:00
Nguyen Anh Quynh
ac68fd441d fix test_x86.c 2020-05-25 00:04:07 +08:00
Nguyen Anh Quynh
ef5e083c4d Merge branch 'master' of github.com:unicorn-engine/unicorn 2020-05-24 23:56:50 +08:00
Nguyen Anh Quynh
3a2ad04f2b refine comments on UC_QUERY_TIMEOUT 2020-05-24 23:56:35 +08:00
Nguyen Anh Quynh
fbef45b18f remove UC_ERR_TIMEOUT, so timeout on uc_emu_start() is not considered error. added UC_QUERY_TIMEOUT to query exit reason 2020-05-24 23:54:45 +08:00
Catena cyber
690ada5f6a
Oss-fuzz ideal integration (#1265)
* Adds oss-fuzz badge

* Generic fix for watchpoints leak
2020-05-23 09:59:30 +08:00
Chen Huitao
17cfef0e56
fix some oss-fuzz (#1259)
* fix oss-fuzz 22107.

* fix oss-fuzz 22112.

* clean up build target.

* fix oss-fuzz 22226.

* fix oss-fuzz 22227.

* fix oss-fuzz 11640.

* fix oss-fuzz 20772.

* remove warning.

* fix oss-fuzz 10459.
2020-05-22 21:58:39 +08:00
Simon Gorchakov
e55b25c744 Removed warning about missing interrupt controller. 2020-05-21 22:10:25 +03:00
Simon Gorchakov
a5ab143189 Fixed some comments in the samples 2020-05-21 22:08:53 +03:00
Catena cyber
216c348c35
Oss-fuzz ideal integration (#1262)
* Fix watchpoint leak in ARM

* Builds fuzz targets with sanitizer support

* Builds fuzz targets with directory driver

* Adds script to dowlonad public corpus

* Adds CIfuzz

To checks Pull Requests with fuzzing

* Use static library for fuzz targets

* Less verbose logs for fuzz driver directory
2020-05-21 16:15:12 +08:00
chfl4gs
e2d1c5bf13
Travis-CI Arm64 build (#1261)
* Travis-CI Migration (#1230)

* Travis-CI Migration

* Travis-CI addition cmake Linux

* Travis-CI cmake fix

* Travis-CI Arm64 build
2020-05-20 11:14:06 +08:00
Chen Huitao
2c66acf4ee
fix #1246 (#1254)
* fix finding python path which only has python3.

* fix #1246, arm host issue.

* skip assembler tests on non-x86 host.

* update macro of dummy value.

* fix MSVC macro.

* update dummy array value macro.

* restore to original qemu code.
2020-05-18 19:57:44 +08:00
Chen Huitao
08240d5453
fix some oss-fuzz (#1258)
* fix oss-fuzz 22107.

* fix oss-fuzz 22112.

* clean up build target.

* fix oss-fuzz 22226.

* fix oss-fuzz 22227.

* fix oss-fuzz 11640.

* fix oss-fuzz 20772.
2020-05-16 10:38:16 +08:00
Simon Gorchakov
fd44c670cb Indented with spaces, not tabs 2020-05-15 09:52:31 +03:00
Simon Gorchakov
5c55aa2d56 Fix UC_HOOK_CODE 2020-05-14 23:46:16 +03:00
Simon Gorchakov
b3da5d0761 Fix readme 2020-05-13 18:30:22 +03:00
Nguyen Anh Quynh
94c94cdff0 README: add Pypi download badge 2020-05-12 16:51:59 +08:00
Simon Gorchakov
425efda77e Remove debug message causing python check failure 2020-05-11 23:55:26 +03:00
Simon Gorchakov
65188be06f Fix some warnings 2020-05-11 23:13:47 +03:00
Simon Gorchakov
c12934a770 Fix C sample output to match python sample 2020-05-11 23:11:52 +03:00
Simon Gorchakov
ea26926b60 Fix ffs() in MinGW 2020-05-11 23:10:19 +03:00
Simon Gorchakov
7e413d2fcf Fix conflict with aarch64 2020-05-11 23:09:08 +03:00
Chen Huitao
18a187b8f8
fix some oss-fuzz (#1255)
* fix oss-fuzz 22107.

* fix oss-fuzz 22112.

* clean up build target.
2020-05-12 01:27:47 +08:00
Simon Gorchakov
92ecc28491 Add python binding aattempt #2 2020-05-10 22:38:42 +03:00
Simon Gorchakov
a5bc710d08 Add python bindings and test 2020-05-10 22:35:47 +03:00
Simon Gorchakov
279483ec29 Fix ffs() argument type problem. 2020-05-10 22:32:51 +03:00
Simon Gorchakov
76a3ebdc03 Fix no return value error. 2020-05-10 22:31:20 +03:00
Nguyen Anh Quynh
f988a41369 x86: support read/write to ST registers 2020-05-11 00:24:58 +08:00
Nguyen Anh Quynh
cf3451c37a bindings: update ARM64 registers 2020-05-10 21:51:14 +08:00
el poto rico
149121539b
[arm64] Add some cool registers (#1253)
I've added the following registers to the API:

 * PSTATE
 * Exception link registers (ELR_ELx)
 * Stack pointers registers (SP_ELx)
 * MMU (TTBRn_EL1)
 * Exception syndrom registers (ESR_ELx)
 * Faulting virtual address registers (FAR_ELx)
 * PAR (PAR_EL1)
 * MAIR (MAIR_EL1)
 * Vector base address registers (VBAR_ELx)
2020-05-10 21:50:00 +08:00
Simon Gorchakov
1ec0c0a769 Added PPC sample 2020-05-08 22:04:58 +03:00
Simon Gorchakov
a6c9b41c68 Initial update for PPC 2020-05-08 21:54:29 +03:00
Nguyen Anh Quynh
ef92e5ed71 coding style cleanup 2020-05-07 14:30:22 +08:00
BAYET
881e08da01
Fix UAF when deleting hook while in hook callback #1127 (#1130)
* Handle the cpu context save in a more pythonic way, so the context can be serialized and reuse in an other process using the same emulator architecture and modes

* Fix type error ; mistakes a size_t uint64_t ; breaks in 32bit...

* Fix the UAF situation when deleting a hook while being in a hook callback. Added an attribute 'to_delete' to hooks, and a list hooks_to_del to delay the free of the hooks

* Minor fixes ; forgot return type of clear_deleted_hooks ; do not declare variable in for predicate
2020-05-07 14:24:48 +08:00
Chen Huitao
f435efd4a7
fix some oss-fuzz (#1249)
* fix oss-fuzz 21012.

* fix oss-fuzz 21741.

* fix oss-fuzz 21743.
2020-05-05 11:11:59 +08:00
Charles Ferguson
f0b509c176
Ensure that hooks are unaffected by a request to stop emulation. (#1154)
This change removes the check for stop requests from the hook loop
macro.

Requests to stop emulation (uc_emu_stop) should only affect whether
the emulation stops. This isn't the case at present for the invocation
of hooks. If emulation is requested to be stopped (which is indicated
by `uc->stop_request`), the hooks will skip all execution. This means
that when the emulation stop is requested, some expected operations
may not occur before the emulation exits - leaving the system in an
inconsistent or broken state.

This is particularly obvious in the case where a CPU interrupt is
required, and a hook has been registered for such cases. The expected
operation is that the hook be called, and no CPU exception be raised
(because the hook has handled it). However, because of the short-cut
in the case where the `uc_emu_stop` function has been called out of
band (eg on another thread), this hook would not be called. In such
cases the execution would terminate with an error that an 'unhandled
CPU exception' occurred, and the hook would never have been called.

This probably affects other parts of the system, such as hooks which
handle remapping of memory on demand (UC_HOOK_MEM_READ_UNMAPPED and
friends) where the remap would not happen and instead an error about
the unmapped memory would be raised.

In all cases, it makes sense that execution continue normally until
the outer loop which controls the execution determines that the
emulation should stop. This will mean that for any given sequence of
events all the emulation operations are completed deterministically
regardless of when the stop request was received.
2020-05-05 08:36:50 +08:00