Commit Graph

2948 Commits

Author SHA1 Message Date
Mario Haustein
5983b399d8 use full prototypes for functions without parameters 2023-10-08 13:39:13 +02:00
9c4f8a8123 Merge pull request #1873 from mlgiraud/fix/vtlb_snapshots
fix: Use correct addresses during memory cow
2023-09-01 18:07:45 +08:00
Mark Giraud
ce1ee5ac4d refactor: Make clippy happy 2023-08-25 15:40:00 +02:00
Mark Giraud
f081af002a test: Add test to reproduce cow+vtlb error 2023-08-24 11:44:21 +02:00
Mark Giraud
e189e1fb8b fix: Use correct addresses during memory cow 2023-08-23 10:18:42 +02:00
da47173d8a Merge pull request #1872 from mlgiraud/feat/uc_ctl_context_mode
Add uc_ctl_context_mode to rust bindings
2023-08-17 12:09:04 +08:00
67765012f6 Merge pull request #1871 from mlgiraud/refactor/rustify
Refactor/rustify
2023-08-17 12:08:05 +08:00
8254890b24 Merge pull request #1868 from mlgiraud/fix/from_handle_unsafe
Fix/from handle unsafe
2023-08-17 11:58:18 +08:00
Mark Giraud
fbe1b4421a feat: Add ctl_context_mode to rust bindings 2023-08-16 14:13:50 +02:00
Mark Giraud
fd3b7082b4 refactor: Make rust bindings more rusty 2023-08-15 11:04:50 +02:00
Mark Giraud
5fd12af68a formating: Use rustfmt style for rust bindings 2023-08-14 13:55:24 +02:00
Mark Giraud
5318fcda33 fix: Make from handle function unsafe 2023-08-14 13:38:26 +02:00
44ca44ea1e Merge pull request #1867 from mlgiraud/fix/no_ffi_in_api
fix: Wrap uc_hook to not expose ffi types in public api
2023-08-14 18:06:14 +08:00
Mark Giraud
bb7df65a1c fix: Wrap uc_hook to not expose ffi types in public api 2023-08-14 10:38:27 +02:00
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
6ae0c97226 Merge pull request #1815 from kassane/zig-build
Zig - Sample build
2023-08-06 22:14:55 +08:00
6801e156aa Format code 2023-08-06 21:53:42 +08:00
30bc08611b Add a unit test for #1717 2023-08-06 21:53:04 +08:00
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
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
6e97e59f54 Fix building on Apple Sillicon 2023-08-03 13:17:26 +08:00
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
239766aa66 Merge pull request #1849 from mlgiraud/fix/rust_compiler_warnings
Fix rust compiler warnings
2023-07-26 15:35:33 +08:00
1e0930d478 Merge pull request #1847 from lockbox/dev
Add CpuModel's for architectures to rust bindings
2023-07-26 15:35:01 +08:00
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
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
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
75676eb0cd Also rebuild flags for aarch32 2023-06-28 10:39:25 +08:00