Tags: DynamoRIO/dynamorio
Tags
i#5383: Fix macOS arm64 test build/run (#7171) This makes tests build and run properly on macOS (14.4) arm64 (M3). Many tests do not pass, but they can be at least run now. Specifically, we: - disable selfmod tests due to build failures on M3; - fix macOS build for mangle_pauth test (test still fails for some reason); - mark dump_ucontext as NYI on macOS; - disable `reachable_client` option by default on macOS due to lack of a private loader; - fix NULL sigcontext_t in `os_forge_exception()` (the `mangle_pauth` test was hitting this). Issue: #5383 #7296
i#3544 RV64: Rebase the dcontext pointer. (#7235) For RISC-V the dcontext_t struct is larger than the biggest valid displacement of the load and store instructions. By rebasing the pointer kept in spill_state_t's TLS slot by 0x800, we can access the entire struct, because the displacement can be in the range of -0x800 to 0x7ff. Architectures other than RV64 are unaffected by these changes. Issue: #3544
i#7262: fix toolchain-android.cmake name ci-package is failing in generating Android 32 bit package because toolchain-android.cmake was renamed as toolchain-android-gcc.cmake. This blocks all package builds. We fix the name in the doc that explains how to cross-compile for ARM Android. Fixes #7262
i#2154 Android64: Fix compile error (#7237) Fixes a compile error for Android64 introduced by #7202 (commit 2f2614b): ``` core/arch/aarch64/asm_offsetsx.h:85:1: error: offsetof of incomplete type 'struct tlsdesc_t' 85 | OFFSET(struct tlsdesc_t, arg, 8) | ^ ~~~~~~ ``` `tlsdesc_t` is not defined on Android. Issues: #2154, #7226
i#7113 decode cache: Add analyzer library for decode_cache_t (#7114) Adds a new drmemtrace_decode_cache library to cache information about decoded instructions using decode_cache_t. This can be used by analysis tools that need to decode the instr encodings in the trace, to avoid overhead of redundant decodes which can get expensive, and also to avoid duplication of various related logic. The library allows the tools to decide what information they need to cache and add implementation for how to obtain it. Also, it uses instr_noalloc_t when possible to reduce heap usage and allocation/deallocation overhead. If the trace does not include embedded encodings or if the user wants to get encodings from the app binaries using module_mapper_t instead, they can provide the module file path to the init API on the decode_cache_t object. decode_cache_t keeps a single initialized module_mapper_t at any time, which is shared between all decode_cache_t objects (even the ones of different template types); this is done by tracking the count of active objects that use the module mapper. decode_cache_t provides the clear_cache() API which can be used in parallel_shard_exit() to keep memory consumption in check by freeing up cached decode info that may not be needed for result computation in later print_results() which has to wait until all shards are done. Refactors the invariant checker and opcode mix tools to use this library. Modifies add_encodings_to_memrefs to support a mode where encodings are not set in the generated test memrefs but only the instr addr and size fields are set. Makes the opcode cache in opcode_mix_t per-shard instead of per-worker. Decode info must not be cached per-worker as that may cause stale encodings for non-first shards processed by the worker. This means the worker init and worker exit APIs can be removed now from opcode_mix_t. Adds decode_cache_test and opcode_mix_test unit tests that verify operation of the decode_cache_t. Issue: #7113
i#3699 ARM: Add padding to priv_mcontext_t for 8-byte alignment. (#7191) ef4482e caused a few additional failures. In particular, the child of a clone3 system call started with the register values shifted: R2 got the value that should be in R1 and so on. That caused the test linux.clone to fail. It turns out that some callers of insert_{push,pop}_all_registers expect that an unpadded priv_mcontext_t will be pushed/popped. Moving the 4-byte padding to above the struct instead of below it makes some tests pass but breaks others. So we add some padding in the middle of priv_mcontext_t, changing its size from 324 to 328. It will probably run slightly faster with the struct (and particularly the field "simd") 8-byte aligned. Update insert_{push,pop}_all_registers and arm.asm for the new struct layout, with some additional changes to arm.asm: + Delete irrelevant X64 macros. + Document the macros more clearly (they can be found with grep). + Change SP only at start and end of function (standard practice, makes debugging easier). + Avoid writing below SP (compatible with signal handlers). This change breaks compatibility so the version is increased to 11.90. Issue: #3699
PreviousNext