Repository navigation
Tags
Tags
x86: Relocate and virtualize LOOP instructions LOOP, LOOPE and LOOPNE were copied verbatim, leaving their rel8 relative to the wrong address, and Stalker lost control when they were taken. Rewrite them like JECXZ and JRCXZ, and carry over the address-size prefix, as it selects the counter width. This also stops JECXZ from turning into JRCXZ on x86_64.
gumjs: Strip source in compiled QuickJS bytecode Since QuickJS BC_VERSION 5, JS_WriteObject() serializes each function's source slice into b->debug.source unless JS_STRIP_SOURCE is set on the JSRuntime, duplicating nested function bodies throughout the compiled bytecode blob. Match gumquickcompile by enabling JS_STRIP_SOURCE in gum_compile_script_task_run().
module-registry: Tear down with early destructors On Windows the registry hooks LdrLoadDll() and LdrUnloadDll(), and reverting those hooks patches code. When an agent delegates code memory to its host, the memory hooks needed for that are gone by the time final destructors run, so the patch failed and we aborted. Tear down in gum_shutdown() instead, so callers can do so while patching still works.
windows: Bound nearby allocation searches gum_memory_allocate_near() could return memory outside the requested range, or memory it had already freed. A downward search reaching address 0 called VirtualAlloc (NULL, ...), letting the OS pick any address, and a first step beyond max_distance returned the freed initial allocation. Limit the search to the requested range and the application address bounds, returning NULL when nothing fits. Step by the allocation granularity, since VirtualAlloc() rounds reservations down to it, and try the aligned near address first.
tests: Cover darwin-mapper TLV lifecycle Map a small dylib with thread-locals in-process and check that each thread gets fresh storage with the initial values, that the storage is freed when a thread exits and when the module is unloaded, and that the destructor releases the key.
PreviousNext