* Update Capstone and add m68k ColdFire support
* Fix test 'core regs linux m68k'
* Add M68K ColdFire integration coverage
* Update Capstone v6 to version 6.0.0-Alpha9
* Refactor CPU mode detection to use case-insensitive string comparison
* Update Capstone next revision to 3df6ff0
This combines the following patches already sent upstream:
https://github.com/zyantific/zycore-c/pull/97https://github.com/zyantific/zydis/pull/603
...and introduces a workaround to fix segfaults caused by accesses into
arrays of the packed ZydisShortString struct. The final solution will
likely be an upstream rework of this structure:
https://github.com/zyantific/zydis/issues/263
Finally, we adjust the condition for when ZydisStringAppendHexU32 is
used, since it is not defined by default. This is already solved more
elegantly in Zydis development upstream, but it requires more changes,
so we stick to a smaller patch on top of the latest release for now.
* Add serenity to librt whitelist
This patch adds serenity to the list of operating systems that dont require librt to be explicity linked
* Disable PCRE2 JIT compilation
* Remove resolve_heap_tcache implementation
Serenity doesn't implement thread caching in its memory allocator, so tcache resolution is not applicable.
* Define rz_sys_pipe as pipe2 for serenity
* Add serenity identifier to rz_types.h
Define serenity as __UNIX__ like, and set RZ_SYS_OS to 'serenity' if __serenity__ identifier is defined
* Add zlib dependency for libzip
* core: Add unified API for describing addresses (resolves rizinorg#4993)
* core: Fix pxW and prompt tests by adding backward-compatible delta limit
This commit fixes the test failures caused by behavioral changes in the
unified address description API:
1. pxW tests failing (cmd_pxw, helloworld-gcc-elf):
- The old pxW code had a hardcoded 8192 limit for flag delta
- Added max_flag_delta option to RzAddrDescribeOptions
- rz_core_addr_get_flag_offset() now uses max_flag_delta=-1 (8192 limit)
2. prompt settings test failing (test/db/tools/rz):
- The old prompt code used spaces around +/- (e.g., 'entry0 + 1')
- Added use_spaces_around_delta option to RzAddrDescribeOptions
- Added rz_core_addr_get_flag_offset_prompt() for prompt display
* core/caddr: Add proper error handling and API improvements
- Add RZ_NONNULL annotations to helper function parameters
- Add null pointer checks after rz_str_dup() to detect allocation failures
- Change helper functions to return bool for error propagation
- Handle memory allocation failures in rz_core_addr_describe() by
checking helper return values and cleaning up on failure
- Use RZ_STR_ISEMPTY macro for consistent empty string checks
- Extract rz_core_addr_description_to_pj() as separate API for
converting RzAddrDescription to JSON format
* core: Add unified API for describing addresses (resolves rizinorg#4993)
core: Fix pxW and prompt tests by adding backward-compatible delta limit
This commit fixes the test failures caused by behavioral changes in the
unified address description API:
1. pxW tests failing (cmd_pxw, helloworld-gcc-elf):
- The old pxW code had a hardcoded 8192 limit for flag delta
- Added max_flag_delta option to RzAddrDescribeOptions
- rz_core_addr_get_flag_offset() now uses max_flag_delta=-1 (8192 limit)
2. prompt settings test failing (test/db/tools/rz):
- The old prompt code used spaces around +/- (e.g., 'entry0 + 1')
- Added use_spaces_around_delta option to RzAddrDescribeOptions
- Added rz_core_addr_get_flag_offset_prompt() for prompt display
* fix: format with clang-format-20
* fix: fix clang-format linter with rewrite '^#define.*/\*.*\\$'
* fix: update clang-format to version 20 in workflows and documentation
* fix: add SPDX license information to .git-blame-ignore-revs
* Make checks against defined Unicode points optional
* Allow to decode UTF-16 without writing the result.
* Remove PCRE2_NO_UTF_CHECK as default, since it can lead to undefined behavior.
* First refactor regex to support utf16 and utf32
* Add UTF-16-BE encoding function
* Add UTF-8 counting helper functions.
- One for counting the number of Unicode code points.
- The other to get the number of bytes required to represent the given UTF-8 string in UTF-16.
* Remove unused code
* Add UTF-8 to UTF-16 conversion function.
* Add type annotations
* Implement utf8 to utf32 string conversion
* Add UTF-16/32 versions of all other necessary regex functions for str search.
* Another regex refactor for utf16/32
* Add UTF16/32 regex matching tests.
* Implement still segfaulting (possibly JIT double usage) regex search.
* Duplicate match_first functions to reduce necessary branch predictions.
* Reduce number of required branches for encoding UTF16/32 to one.
* Duplicate match_all_internal functions to reduce necessary branch predictions.
* Fix too early free
* Only allocate match vector when needed.
* Fix: use code point size of buffer.
* Add missing return
* Normalize pointers to UTF16/32 strings to use proper code point with
* Also replace spaces with in utf16/32
* Add an additional host endian tests for UTF16/32 string encodings.
* Ensure thread savety.
JIT compiled patterns need to be owned by a single thread.
For the search we need to clone it.
JIT matching structures are optionally cloned as well.
* Enforce NO_UTF_CHECK in regex search.
This improves performance and currently is
default because we always match on binary data.
* Fix matching of UTF strings which are not suported by direct buffer matching.
PCRE2 only supports matching against memory which is aligned
to a code point width of the encoding.
These changes prevent taking the fast (direct matching with PCRE2) path
and use the slow string search path if the alignment doesn't match
the UTF string encoding.
To not complicate the change and additional alignment member
is added to each searched string in the search collection.
* Create search hit description on the stack
* Unset complete JIT matching if user provided custom jflags.
* Document what passing NULL to copy function pointers does.
* Replace the retarded idea of tracking offsets with a hashmap with a linear buffer.
This improves performance something like 10x.
* Remove const for the non-JIT builds.
* Remove additional flags for skip checking.
It is not needed because each decoded character is checked for printablity below anyways.
* Enfore no setup of IO mem with 0xff
* Fix: Set JIT complete flag for multi regex patterns
* Fix heap.
* Add note about worsed performance path.
* Fix unit test with string terminated by undefined code point.
* Run clang-format
* Fix order of arguments
* Add warning about string search with encoding=guess to tests.
* Fix string lengths, they no longer count the final invalid code point.
* Fix endian macro on Windows
* Fix NULL dereference
* Fix number tests
* Use endianness check not dependent on stdbit
* Fix type annotations.
* Reintroduce rz_str_len_utf8char
* Fix command description.
* Fix and unify RZ_SYS_ENDIAN macros.
- Don't allow unhandled architectures anymore.
- Check endianness for Sparc and PPC using non GCC/Clang compilers.
- Fix several endianness checks using the value instead of the macros.
* Fix tests
* Apply review comments.