Commit Graph

3068 Commits

Author SHA1 Message Date
Mark Giraud
bb7df65a1c
fix: Wrap uc_hook to not expose ffi types in public api 2023-08-14 10:38:27 +02:00
lazymio
19a794b97e
Merge pull request #1866 from mlgiraud/fix/unsafe_ptr_deref
fix: Make functions that deref ptr unsafe
2023-08-13 14:36:50 +08:00
Mark Giraud
4e194a54d9
fix: Make functions that deref ptr unsafe 2023-08-11 13:18:04 +02:00
lazymio
3c89d0c3ce
Fix ctl_remove_cache for python2 2023-08-09 14:11:21 +08:00
lazymio
6ae0c97226
Merge pull request #1815 from kassane/zig-build
Zig - Sample build
2023-08-06 22:14:55 +08:00
lazymio
6801e156aa
Format code 2023-08-06 21:53:42 +08:00
lazymio
30bc08611b
Add a unit test for #1717 2023-08-06 21:53:04 +08:00
lazymio
c889258d8e
Avoid overwriting tmp0 2023-08-06 21:25:37 +08:00
Matheus C. França
4fb4b3e4b0 Zig binding
* zig binding - sample added
* zig build CI
* split mingw (shared/static) CI/CD
* unicorn log added
* build C/C++ samples
2023-08-04 11:24:00 -03:00
lazymio
0619deeafd
Merge pull request #1861 from basavesh/dev
Backport qemu/qemu@75b208c
2023-08-04 11:18:49 +08:00
basavesh
cf5e75953d Backport qemu/qemu@75b208c
target/i386: fix operand order for PDEP and PEXT

For PDEP and PEXT, the mask is provided in the memory (mod+r/m)
operand, and therefore is loaded in s->T0 by gen_ldst_modrm.
The source is provided in the second source operand (VEX.vvvv)
and therefore is loaded in s->T1. Fix the order in which
they are passed to the helpers.
2023-08-03 13:12:39 +02:00
lazymio
6e97e59f54
Fix building on Apple Sillicon 2023-08-03 13:17:26 +08:00
lazymio
6074150ebe
Merge pull request #1850 from mlgiraud/fix/clippy_warnings
Fix clippy warnings
2023-07-26 19:53:52 +08:00
Mark Giraud
c43ab92326
fix: Add missing Copy derive 2023-07-26 09:58:09 +02:00
Mark Giraud
5a5b1bbb05
fix: update bitflags dependency and fix flippy warnings 2023-07-26 09:55:04 +02:00
lazymio
239766aa66
Merge pull request #1849 from mlgiraud/fix/rust_compiler_warnings
Fix rust compiler warnings
2023-07-26 15:35:33 +08:00
lazymio
1e0930d478
Merge pull request #1847 from lockbox/dev
Add CpuModel's for architectures to rust bindings
2023-07-26 15:35:01 +08:00
lazymio
34cca20877
Merge pull request #1848 from PhilippTakacs/vtlb-perms
vtlb only cache access permisions required for the operation
2023-07-26 15:32:45 +08:00
Mark Giraud
546561f3cc
fix: Remove unnecessary use statement that causes warnings 2023-07-18 11:49:18 +02:00
Takacs, Philipp
f6cfe1092b vtlb only cache access permisions required for the operation
see #1845
2023-07-17 12:54:38 +02:00
elicn
0a876d30ea Allow setting CPU model on Uc initialization 2023-07-14 00:44:58 +03:00
elicn
cef2b3394d Fix MMIO hooks prototypes 2023-07-14 00:43:42 +03:00
elicn
b1605d4006 Fix TCG opcode hook prototype 2023-07-14 00:42:40 +03:00
Eli
922c1e6333
Merge branch 'dev' into uc-py-next 2023-07-13 23:00:01 +03:00
lockbox
2f2bf8d96f add cpu model to architectures for rust bindings 2023-07-13 13:58:14 -04:00
lockbox
84fe5d1756 expose ffi in rust bindings 2023-07-13 13:57:04 -04:00
lazymio
e88264c658
Merge pull request #1820 from PhilippTakacs/cow
add memory snapshots
2023-07-11 19:24:00 +08:00
Takacs, Philipp
ab5938b3f6 Update CREDITS.TXT 2023-07-11 11:51:44 +02:00
Takacs, Philipp
df18756234 implement uc_mem_unmap with snapshots
still has todos and need tests
2023-07-11 11:51:44 +02:00
Takacs, Philipp
716c8f1c4c handle snapshots over context_save context_restore 2023-07-11 11:51:44 +02:00
Takacs, Philipp
e54cf7ee03 find_ram_offset optimization
The ram_offset allocator searches the smalest gap in the ram_offset address space.
This is slow especialy in combination with many allocation (i.e. snapshots). When
it is known that there is no gap, this is now optimized.
2023-07-11 11:51:44 +02:00
Takacs, Philipp
550265f3c1 snapshot benchmark
simple benchmark for the snapshots
2023-07-11 11:51:44 +02:00
Takacs, Philipp
80bd825420 implement simple memory snapshot mechanismus
Uses Copy on Write to make it posible to restore the memory state after a snapshot
was made. To restore all MemoryRegions created after the snapshot are removed.
2023-07-11 11:51:40 +02:00
Takacs, Philipp
065af19dc5 use address_space_translate to find memory mapping
first version has bugs
2023-07-11 11:47:50 +02:00
Takacs, Philipp
cd85f589a2 add memory_region_add_subregion_overlap 2023-07-11 11:47:50 +02:00
mio
aee4038526
Fix test_x86_0xff_lcall test 2023-07-07 18:50:55 +08:00
Robert Xiao
f55e7834ba Replace javah by javac -h, only write new constant files if something changes.
The const_generator changes help to ensure that e.g. Java rebuilds don't keep
rebuilding everything.
2023-07-06 20:12:36 -07:00
mio
2325f41ead
Add a unit test for a7a5d187e7 2023-06-30 20:28:59 +08:00
mio
a7a5d187e7
Backport 10b8eb94c0
target/i386: Verify memory operand for lcall and ljmp

These two opcodes only allow a memory operand.

Lacking the check for a register operand, we used the A0 temp

without initialization, which led to a tcg abort.
2023-06-30 20:21:56 +08:00
Robert Xiao
763d04127c Switch Java bindings to reg2 API.
This is mostly an extra safety measure; the front-end Unicorn.java should always
be sending an appropriately-sized buffer.
2023-06-29 16:37:42 -07:00
Robert Xiao
dfdc8e7e8e Switch to Maven to build the Java bits.
Maven is now used to update the constants, build the Java code, call make to
build the native library, and run all the tests. I have removed the "install"
and "uninstall" targets; instead, the expectation will be that the JNI library
will be placed somewhere on java.library.path and the JAR file will be used as
usual (e.g. in a downstream Maven project, or placed on the classpath of your
project).

Since Maven is now running our tests, this eliminates the need to bundle test
dependencies in `testdep`, and makes the project structured more like a typical
Java project.
2023-06-29 16:08:18 -07:00
mio
247d643f2f
Restore Py2 compatibility 2023-06-28 16:40:43 +08:00
mio
d6d1af243f
Specify the source directory explicitly 2023-06-28 16:40:17 +08:00
mio
75676eb0cd
Also rebuild flags for aarch32 2023-06-28 10:39:25 +08:00
Nguyen Anh Quynh
3bba11c402 remove all legacy DYNLOAD code 2023-06-22 12:19:06 +08:00
lazymio
d4b92485b1
Remove stale bot 2023-06-17 23:51:46 +02:00
Robert Xiao
2198ea4f69 Add comment about unicorn_Unicorn.h to the .c file 2023-06-17 14:34:25 -07:00
Robert Xiao
d9407c9041 Add a link to the relevant issue for ARM PAC handling 2023-06-17 14:22:56 -07:00
Robert Xiao
05f6fb9bf3 Properly check return value of makeHookWrapper 2023-06-17 14:19:10 -07:00
Robert Xiao
98f70d3213 Port sample_batch_reg.c to Java, incidentally finding a bug in the generic register implementation. 2023-06-17 14:19:10 -07:00