Commit Graph

27 Commits

Author SHA1 Message Date
f3323469d0 Format 2024-02-12 00:10:58 +08:00
Takacs, Philipp
d9d2c4e581 fix uc_mem write with cow when using upper half of the address
uc->target_page_align is a uint32_t. When the binary not will only
invert the 32 bit of the value. Used this in a binary and operator with
a uint64_t will case the upper 32bit of the address to be 0. Therefor
the bug only appears when the upper 32bit of the address are used.

Now a local uint64_t variable is used for the alignemend and the test
uses a not page alligned address which does not fit in 32bit.
2024-01-15 14:20:29 +01:00
Mark Giraud
f081af002a test: Add test to reproduce cow+vtlb error 2023-08-24 11:44:21 +02:00
6801e156aa Format code 2023-08-06 21:53:42 +08: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
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
mio
4b961a8ef6 Apply fix for big endian hosts per #1710 2022-10-28 16:20:20 +02:00
mio
c144f06145 Format code 2022-10-01 00:14:08 +02:00
Timo Röhling
e1e7b25268 Adjust big memory test for host pagesize
On machines with a page size larger than 4K, the requested memory size
in `test_map_big_memory` gets rounded up and overflows to zero.

This PR adds some code to query the page size and adjust the requested
memory size accordingly.
2022-09-25 18:16:06 +02:00
relapids
2e8986174b Fix leak in test_mem_protect_map_ptr. 2022-08-15 05:38:29 -07:00
e3613a9f59 Format code 2022-05-28 23:46:18 +02:00
2a6529348c Support uc_mem_protect on mmio regions
Also make mmio ranges return the correct errors on wrong protection
2022-05-28 23:33:43 +02:00
f4f726d7fc Add test for ensuring hooks are get called only once 2022-05-07 00:23:04 +02:00
3d3deac5e6 Fix crash when mapping a big memory and calling uc_close 2022-04-16 19:17:41 +02:00
cf18982e1c Add two tests for mem map wrap 2022-04-16 18:19:41 +02:00
shuffle2
2912cd1e29 fix rust bindings build on windows (#1584)
Refine rust bindings.
2022-04-16 13:40:04 +02:00
96518634fb Fix the wrong block found when doing split_region 2022-02-12 21:34:46 +01:00
78e0ddbc4d Fix mmio unmap 2021-11-24 00:18:19 +01:00
4ed1c4cff9 Fix test name typo 2021-11-23 23:24:53 +01:00
Sven Bartscher
3e2580ef9e Add test case for #1497 2021-11-23 22:47:20 +01:00
ccfb66611f Move test to test_mem 2021-11-23 00:41:49 +01:00
2f61592ff9 Fix uc_mem_protect 2021-11-07 20:37:58 +01:00
e62b0ef255 Add clang-format and format code to qemu code style 2021-10-29 12:44:49 +02:00
9131856506 More tests 2021-10-26 11:32:57 +02:00
Aurimas Blažulionis
160045a910 Binary search mapped blocks 2021-10-20 20:49:55 +01:00
mio
91451aa2f5 Add a new unit test file 2021-10-20 21:27:22 +02:00