3335 Commits
Author SHA1 Message Date
lazymio 7c5db94191 Revert "Java m68k regression fix (#2267)" (#2295)
This reverts commit 7a89371fd2.
2026-02-17 14:49:59 +08:00
Gheorghe Crihanandmac 7a89371fd2 Java m68k regression fix (#2267)
* - Fix JAVA binding compilation:
Apparently, the pointer there is a leftover from the previous implementation.
Fails to build on OSX.

* - Fix m68k regression test, probably needs updating as a result of #2161.

* - Fix the Java regression testing, probably as a result of fixing #2161.

---------

Co-authored-by: mac <[email protected]>
2026-02-17 14:43:46 +08:00
lazymio c24c9ebe77 Update README.md 2025-09-11 21:14:44 +08:00
mio 8028ec436f fix again v2.1.4 2.1.4 2025-09-10 00:38:25 +08:00
mio 7845991d52 implement glib_random_bytes for msvc 2025-09-10 00:20:18 +08:00
mio a20d7be52c Fix incorrect folder name under release 2025-09-09 23:30:22 +08:00
mio 79ca1d03b7 update release ci 2025-09-09 23:23:00 +08:00
mio 29caa850d7 add a comment 2025-09-09 23:19:21 +08:00
mio 9efb73db65 refactor rust directories 2025-09-09 23:15:45 +08:00
mio 40d70b6867 refactor rust packages 2025-09-09 23:04:22 +08:00
mio a40db6c773 update changelog 2025-09-09 18:12:24 +08:00
mio e51712a6ee Also add bindings.rs wrapper 2025-09-09 18:12:01 +08:00
mio b474b4d0f2 fix rust bindings 2025-09-09 18:11:14 +08:00
mio d94195d008 Update ChangeLog 2025-09-09 17:22:35 +08:00
mio 1730bd8d4c bump consts 2025-09-09 15:13:21 +08:00
mio 3620d70677 bump 2.1.4 2025-09-09 15:13:07 +08:00
mio bd70684ccc Sync FAQ 2025-09-09 15:10:21 +08:00
mio 0ea364c6f4 Merge branch 'dev' for 2.1.3 2025-09-09 15:08:37 +08:00
lazymio b6249035b7 concurrent control (#2235) 2025-09-09 14:33:02 +08:00
a3c48441a7 Python bindings: Use ABI3 wheels (#2223)
* Python bindings:
- Enable ABI wheel building
- Rework the workflow in order to build ABI3 wheels for all python versions without any separations
- Bump cibuildwheel to v2.23.3

* more memory

* revert to previous value

* Smaller tcg buffer size for this test

* Migrate the action

Reviewed-by: Antelox <[email protected]>

* Add concurrency control

* reduce because 32bit process may run-out-of virtual addresses

* Revert "Add concurrency control"

This reverts commit 79d76a9f5b.

* use macos-14 tempporarily

---------

Co-authored-by: mio <[email protected]>
Co-authored-by: ReenigneArcher <[email protected]>
2025-09-09 13:40:19 +08:00
lazymio 443aa98c95 Revert "glib_compat/glib_compact: Clear the buffer in g_hash_table_resize (#2…" (#2220)
This reverts commit c8bc9eb9b0.
2025-08-30 15:18:24 +08:00
scribam fd2e0e6980 Add support for clangarm64 (#2228) 2025-08-16 15:13:51 +08:00
scribam 94847a96d8 Fix cmake deprecation warning (#2226) 2025-08-08 10:19:26 +08:00
patryk4815 79f910ea73 Fix read_sprr_perm for Apple real CPUs and GitHub Actions; enable Apple ARM64 wheel builds on PyPI. Fixes #2033. (#2227)
* Fix `read_sprr_perm` for Apple real CPUs and GitHub Actions; enable Apple ARM64 wheel builds on PyPI. Fixes #2033.

* Guard `assert_executable` with `pthread_jit_write_protect_supported_np`
2025-08-08 10:16:27 +08:00
scribam 1cb2c67054 Remove ninja installation from macos runners (#2225) 2025-08-06 09:23:13 +08:00
lazymio 3d2febe82d Enable install for rust bindings (#2224)
* Enable install for rust bindings

* also search for lib64
2025-08-04 13:54:52 +08:00
Dongyan Qian c8bc9eb9b0 glib_compat/glib_compact: Clear the buffer in g_hash_table_resize (#2219)
There has a hidden danger in g_hash_table_resize function:

The g_hash_table_resize, it seems to resize the has table, and write the
old value to the new hash table. It seems look for the empty items in
the new_nodes, and if the new_nodes is not be cleared, it maybe naver
found the empty items. So I added a line under the g_new0 function, and
I think clearing new_nodes every time may improve the performance.

Added a memset to clear the new_nodes to fix this problem.
REF: https://github.com/intel/unicorn-for-efi/pull/13

Signed-off-by: Chao Li <[email protected]>
Signed-off-by: Dongyan Qian <[email protected]>
2025-07-22 22:14:18 +08:00
lazymio 3ad58e17c5 Minor fixes for vmem apis (#2199)
* Minor fixes for vmem apis

* Fix rust bindings Prot

* Format bindings
2025-06-10 08:22:26 +08:00
PhilippTakacs 479b0c2394 add uc_mem_read_virtual (#2121)
* x86 mmu allow probe requests

* add api to access memory by virtuall addresses

New api to read from, translate, or write to a virtual address. When
using the MMU it's useful to direct use the virtual addresses.

* fixup! add api to access memory by virtuall addresses
2025-06-08 20:39:53 +08:00
PhilippTakacs 7394a6c4c5 reset invalid_error before ram_block_add (#2189)
ram_block_add() sets invalid_error when allocation fails. This is later
checked for error handling.
2025-06-08 20:34:11 +08:00
HyperSine f0af3c824c fix incorrect ret of trampoline closure in alloc_code_gen_buffer (#2197) 2025-06-08 20:33:50 +08:00
lazymio 0c09b13845 Patch from Saferewrite (#2188)
* port patch from https://pqsrc.cr.yp.to/saferewrite-20250505/unicorn-patch

* Advance PC on execptions
2025-05-17 22:25:49 +08:00
lazymio 5e1a634b67 fix x86 pc (#2187)
* fix x86 pc

* rm by accident
2025-05-16 16:20:05 +08:00
Z. Liu 5fa5388f88 qemu/configure: make strings command can be redefined by ${STRINGS} (#2186)
Signed-off-by: Z. Liu <[email protected]>
2025-05-16 01:05:22 +08:00
AdvDebug cb2f418928 Added src for CFG check and standalone flag (#2182)
Added CFG check on instance creation and added "--standalone" flag
2025-05-10 18:40:26 +08:00
EvianZhang 59608e7c93 Fix skip_sync_pc_on_exit (#2181) 2025-05-07 11:51:51 +08:00
EvianZhang cad506442a Add edge generated callback (#2176) 2025-04-30 16:43:11 -04:00
EvianZhang 7c78ba3086 Add Display and Error impl for uc_error for Rust bindings (#2171)
* Add Display and Error impl for uc_error

* Use to_str().unwrap() instead of to_string_lossy()
2025-04-24 11:55:23 +08:00
EvianZhang 7134b0a7da Make Unicorn struct clone-able (#2170)
* Make Unicorn struct clone-able

* Remove perfect_derive and implement it manually
2025-04-22 17:14:46 +08:00
EvianZhangandmio 89a14228b4 Add from_handle_with_data method (#2169)
* Add from_handle_with_data method

* Fmt code

---------

Co-authored-by: mio <[email protected]>
2025-04-21 20:04:54 +08:00
lazymio e867b08c66 S390x registers (#2167)
* support more s390x registers

* update consts
2025-04-16 10:13:29 +08:00
lazymioandWangLiangpu 444c7061e7 Loongarch port (#2164)
* Squashed commit of the following:

commit 2d9587f26b
Author: WangLiangpu <[email protected]>
Date:   Wed Nov 1 21:36:35 2023 +0800

    fix: fix tcg_out_dupi_vec interface conflicts

commit b957324d3d
Author: zhaodongru <[email protected]>
Date:   Mon Oct 23 18:15:01 2023 +0800

    start loongarch compile

    fix: modify the code to pass compile

    add: add code for tcg_out_op, tcg_can_emit_vec_op, tcg_target_op_def to support new tcg_op

    fix: fix bugs related to epilogue and ret_addr

    fix: fix bug in qemu_ld_slow_path, the return register is wrong

* Fix use_lsx_instructions

* Fix

---------

Co-authored-by: WangLiangpu <[email protected]>
2025-04-15 11:43:10 +08:00
Richard Liebigandr0b0t 455aae2a8e Remove the size limit for memory read and write (revamped) (#2144)
* modify uc_priv.h to use 64 bit hwaddr type for length for uc_write_mem_t and uc_read_mem_t

* propogate 64 bit address support to memory function inside unicorn.h

* modify physical memory functions to ensure 64 bit support for size parameters

* apply  uint64_t size handling inside the memory handling main functions

* remove INT_MAX size check as we now use a 64 bit address

* add @secretnonempty unit test for large memory addresses to avoid regression

* replace size_t in python3 bindings with u64

* adjust rust bindings

* use format.sh script to improve formatting

* small adjustments to java bindings, because jlong type is sometimes already used

* adjust dotnet bindings to reflect new type sizes

* adjust pascal bindings

* adjust ruby bindings

* adjust vb6 bindings

* adjust zig bindings for 64 bit size support

* fix build.zig.zon for newer zig versions

* add haskell binding support for 64 bit sizes

* use mlugg/setup-zig instead of goto-bus-stop/setup-zig github action to get access to current zig releases

* use uint64_t instead of size_t for uc_mem_unmap

* add whitespace between functions to preserver formatting

* add precompiler check for android and abort execution of testcase to avoid infinite low memory killer loop

* downgrade zig version to 0.14.0 again to ensure that pipeline can run through

* adjust rust mmio_unwrap type to use u64

* change ffi size type of uc_mem_map_ptr into u64

* add warning to rust slicing

* return read_mem_as_vec to earlier state, leave usize as argument because there cannot be larger vec![] anyway

* adjust regions inside MmioCallbackScope to use u64 for region sizes

* adjust regions inside MmioCallbackScope to use u64 for region sizes inside search vec

* finalize dotnet bindings inside IBinding.fs

* fix typo

* adjust types inside Unicorn.fs

* finalize type wrangling inside F# bindings, setting MemRead and MemWrite to correct types

* fix missing bracket inside bindings/rust/src/lib.rs

* replace ffi interface to hook interface inside rust lib

* fix testcases to use u64 for longer references

Co-authored-by: r0b0t <[email protected]>
2025-04-15 11:42:40 +08:00
Amaan Qureshi fd1bf224e9 fix(python): catch BaseException in wrappers instead of Exception (#2163) 2025-04-14 13:33:51 +08:00
mio acb638c40a Further fix incorrect register size 2025-04-14 13:12:26 +08:00
mio 81a04e222a Fix incorret register size 2025-04-14 13:09:43 +08:00
mio ed5d47b338 Fixup cr register on be (s390x) 2025-04-14 13:04:20 +08:00
mio 59ff63a90d Fix cr3 2025-04-14 12:42:28 +08:00
mio b20dc83055 Remove extra printing 2025-04-14 12:40:16 +08:00
mio 2728d8da4f Fix cr0/cr4 should be uint32_t 2025-04-14 12:39:53 +08:00