Commit graph

311 commits

Author SHA1 Message Date
billow
9e7cc02fcf
Update Capstone and add M68k ColdFire support (#6399)
* 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
2026-05-31 16:15:56 +08:00
Naren Sirigere
519cef51a5
librz/arch: check if M680X HSC12X/RS08 is present in Capstone (#6318) 2026-05-06 11:53:40 +08:00
billow
d4ff5b7f95
librz/arch: fix m68k CPU32 detection with Capstone v6 (#6314)
Co-authored-by agent: Codex/GPT-5
2026-05-05 23:39:52 +08:00
Rot127
d0c21c67d5
Implement ring buffer (#6081)
* Add first ring buffer implementation.
* Add likely and unlikely macros.
* Implement take and put
* Block writes to buffer if it is full.
* Make Is_open return bool and add unsafe fcn for is_empty
* Add ring buffer tests.
* Add blocking take() function to ring buffer.
* Add open() function to ring buffer
2026-04-13 10:15:49 +00:00
Khairul Azhar Kasmiran
e0ec191f97
meson: Fix include_directories sandbox violation (#6119) 2026-03-29 17:44:45 +08:00
NOT XVilka
e9dd764f87
refactor: remove unused mpc subproject (#6091)
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2026-03-25 20:30:15 +08:00
Khairul Azhar Kasmiran
033cf58272
Bump min meson version to 0.58.0 (#6065) 2026-03-22 14:19:44 +08:00
Farhan Saiyed
e4464a1c55
blake2 hash support (#5995) 2026-03-06 22:17:59 +08:00
Anton Angelov
d6f278e1a5
Enable SSE2 on targets where it's supported (#5990) 2026-03-04 23:54:18 +08:00
Anton Angelov
95f94ae258
refactor: SwissTable implementation for ht (#5860)
* Add ht benchmarks
* Initial implementation
* Finalize native per-group lookup support
* Lookup SSE2 implementation
* Improve hashing
* Add support for custom elem_size
* Avoid double h2 hashing when reserving slot
* Make custom elem_size support conditional
* Fix issues with bitwise and default lookup implementations
* Implement deletion trick optimization
* Track growth_size instead of deleted_slots
* Refactor SDB to access ht via API instead of internals
* Modify SDB tests which rely on hashtable order
* Fix SDB build warnings
* Fix bug with finding next power of two
* foreach_kv to return a bool result
* Change SDB diff order expected by serialize_analysis unit test
* Fix bug in the bitwise lookup implementation
* Remove second call to rz_core_init() which causes memory leaks
* Update some regression tests to accept reordered output
* Adapt ht clear to new implementation
* Use fini_kv_pair and fix 1 potential leak on malloc failure
* Fix cmd/types test after merge
* Avoid second call to calsize_key and avoid iter leaks on malloc failure
* Improve hash distribution
* Extend benchmark suite
* Fix bug with string hashing
* Branchless write to mirrored ctrl bytes
* Simplify string hash and remove potential UB
* Move RZ_PREFETCH macro to rz_types.h
* Add SSE2 discovery in Meson
* Forward SDB string hash function to ht string hash
* Try to revert test_cpu_profiles() to avoid relying on a baked SDB file
* Revert SDB/CDB hash function change
* Fix SDB reference to HT hash function instead of CDB hash
* Change calloc to malloc
* Avoid storing/checking key_len and key_value if they are ut64
* Improve string hash function
* Rename default hash functions
* Improve bench code
* linter.yml: set clang-path to point to llvm-18
2026-03-02 12:31:35 +08:00
Naren Sirigere
ab82fc9fa3
Add SerenityOS Support (#5905)
* 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
2026-02-23 16:34:05 +00:00
billow
b4ca5641e6
Update libdemangle (#5850)
* Update libdemangle to revision 37f9e9e
* Fix: C++ demangler plugin definition
* Fix: update tests
2026-02-19 12:20:29 +08:00
Khairul Azhar Kasmiran
5a30814c6a
Fix duplicate "Dependency rzheap found" messages (#5908) 2026-02-12 21:52:11 +08:00
bubblepipe
7f57ae2c70
heap: refactor glibc heap parser (#5880) 2026-02-12 03:20:28 +08:00
bubblepipe
4aab82b9b2
heap: jemalloc parser refactor, add FreeBSD support (#5864) 2026-02-05 00:44:27 +08:00
Anton Angelov
602781b2dc
Implement rz_sys_backtrace() for Windows/MSVC (#5784)
* Implement rz_sys_backtrace for Windows/MSVC
* Add dbghelp.lib to dependency list
2026-01-13 00:55:20 +08:00
Rot127
c0817b895c
Always fallback to subproject if use_sys_pcre2 is unset. (#5787)
This should prevent dependency confusions if an OS
(FreeBSD in this case) has multiple different PCRE2 libraries.
2026-01-13 00:54:54 +08:00
Maijin
129903687e
doc(hash): improve README and add example (#5135) (#5614)
Improved `librz/hash/README.md` documentation to accurately reflect API usage, specifically `RzHash` vs `RzHashCfg`. Added a working C example `examples/api/hash/md5.c` demonstrating proper initialization and hashing workflow.
2025-12-14 02:39:34 +08:00
Zephyr Lykos
8d6685b99e
Fix using system zydis (#5416) 2025-10-01 10:10:41 +08:00
Zephyr Lykos
aadf850e28
Fix using system libpcre2 (#5417) 2025-10-01 10:09:55 +08:00
Zephyr Lykos
fef5cb03fb
Add option to use system BLAKE3 (#5414) 2025-09-28 13:11:33 +08:00
Khairul Azhar Kasmiran
811bd2e7b5
Revert -Wno-error cancel flag (#5408)
* Revert `-Wno-error` cancel flag
* Set `werror=false` in rizin-grammar-c subproject
2025-09-25 20:17:06 +08:00
Rot127
fdc9ecbacc
Add several memory helpers (required for speed up of string search). (#5372)
* Add function to memcpy memory with offset.

* Add count trailing zeros function.

* Add function to determine pointer alignment.

* Add helper to swap sequences of 2 bytes.

* Add helper to swap sequences of 4 bytes.

* Print pointer in warning

* Fix tests

* Use uintptr_t type to prevent undefined behavior.

* Remove alignment requirement and rely on malloc promises.

* Add in place byte swap functions.

* Move the endianness swapping into util/rz_endian

* Use GNU builtin __builtin_ctzll/clzll.

Also fixes the include guards of __builtin_clzll
and handles the undefined case of x == 0 of it.

* Add doxygen
2025-09-17 00:07:44 +08:00
Premade
06061654db
Add: Mark API (#5313)
* Add: Bookmark API

* Fix: missing licenses + project migration

* Fix: migration

* Fix: formatting

* Fix: migrate info in cmd/project test

* Rename: Bookmark to Mark

* Remove: bookmark

* Fix: function type comment

* Fix: code coverage

* Add: tests, docs, ownership type annotations

- Added test/db/cmd/cmd_mark test
- Improved API documentation with \brief, \param, \return and proper grammar
- Added RZ_BORROW / RZ_OWN annotations to relevant API functions

* Fix: missed annotation

* Fix: type annotations + update meson.build

* Fix: License in `cmd_mark.yaml`

* `serialize_mark.c`: add NULL checks
2025-09-01 22:06:01 +00:00
Giovanni
d933ccc4e5
Remove rz-libswift to avoid embedding C++ projects. (#5320)
* Remove rz-libswift to avoid embedding C++ projects.
* Fix test
2025-08-27 10:38:10 +08:00
Ahmed Kamal
f15589d3cf
Add rz_str_ncat (#5307) 2025-08-24 21:10:19 +08:00
Giovanni
3efdc9a318
Add rz-libswift as dependency and disable globally use_swift_demangler (#5298) 2025-08-16 00:03:55 +08:00
NOT XVilka
ba8c170852
Migrate from Capstone to Zydis (x86 architecture) (#5164)
* Added build files [Capstone to Zydis]

* x86 Analysis [Capstone to Zydis]

* Changed x86 RzIL [Capstone to Zydis]

* Changed asm and arch files [Capstone to Zydis]

* Compilation, build error and test fixes [Capstone to Zydis]

* Test changes [Capstone to Zydis]

* Remaining changes [Capstone to Zydis]

* Added BE support [Capstone to Zydis]

---------

Co-authored-by: tushar3q34 <tushar3q34@gmail.com>
2025-05-23 13:03:46 +00:00
Giovanni
144b47d455
Move RzBreakpoint into RzDebug (#5124)
- Move trap/sw breakpoint into RzArch
- Remove RzBreakpointPlugin & RzBreakpointArch
- Add get_sw_breakpoint_at/get_sw_breakpoint_size_at binds
- Remove `dbh-`
- Change `dbh` to just list supported archs for sw breakpoints
- Implement correct PPC traps
- Add missing x86 breakpoint callback
2025-05-13 01:57:37 +08:00
Gleb Popov
8e409be858
meson: Use rizin-grammar-c as a subproject unconditionally (#5103) 2025-04-29 23:14:32 +08:00
NOT XVilka
da77e0cb39
build: enable GNU C99 extension by default (#5099)
Co-authored-by: Anton Kochkov <anton.kochkov@gmail.com>
2025-04-25 02:26:58 +08:00
Anton Kochkov
ce6328496d Bump version to v0.9.0 2025-04-23 16:49:14 +08:00
Khairul Azhar Kasmiran
602b1ae187
Show RZ_LOG_WARN warnings by default for all build opt levels (#5084)
* Show RZ_LOG_WARN warnings by default for all build opt levels
* Check for unsupported `checks_level` values
2025-04-13 21:08:17 +08:00
Anton Kochkov
c8e653fbc1
subprojects: update libzip from 1.9.2 to 1.11.3 (#3667) 2025-03-01 15:25:09 +08:00
Khairul Azhar Kasmiran
79814e46b6
Fix #4799: Use Meson to set c_std=c99 (#4828)
* Fix #4799: Use Meson to set `c_std=c99`
* Define `_GNU_SOURCE`
* Use alt syntax in float subtraction
2025-01-13 22:22:23 +08:00
amibranch
70654e80f6
build: Fix meson-build global_arguments (#4698)
* Added a CI-task to check if rizin could be used as subproject
* Fixed some new global-arguments in meson-build

Co-authored-by: amibranch <amibranch@users.noreply.github.com>
2024-11-11 19:07:34 +08:00
amibranch
8e6b764fb5
build: Improved meson-build to use rizin as subproject (#4684)
* Setting GNU99/C99 standard for subprojects
* Remove use of `add_global_arguments`
* Added extern "C" linkage specification to some public headers of rizin
* Changed the meson_git_wrapper.py-script to explicitly specify the output-path
* Made the RIZIN_BUILD_PATH conditional in the integration-test meson-build

Co-authored-by: amibranch <amibranch@users.noreply.github.com>
2024-10-29 23:59:42 +08:00
Rot127
86d8953912
librz/arch: use proper capstone enum names. (#4691)
* Use pre-v5 enum names which are now supported by compatibility macros.
* Bump CS version to newest next
* Remove Capstone v6 job until v6 patch release is out.
* Check for support of enum compare/conversion warnings.
2024-10-29 17:11:34 +08:00
Anton Kochkov
6f0d6750d1 subprojects: rename tree-sitter-c into rizin-grammar-c 2024-09-12 00:41:23 +08:00
Dhruv Maroo
7c57b92dae Add wrap for native SoftFloat subproject 2024-09-04 21:16:17 +08:00
Giovanni
260811259a
add softfloat_dep when cross build (#4593) 2024-08-16 17:40:32 +08:00
Dhruv Maroo
19ec6ba298
Use SoftFloat 3e for implementing arithmetic operations in RzFloat (#4535)
* Add a new test for checking 80-bit floating point operations

    * New test `f80_ieee_div_test` tests the division of two 80-bit
      floats

* Add SoftFloat 2c as a meson subproject

* Add softfloat code to make the failing test case pass

* Update the hash for the latest softfloat revision

* Implement `rz_float_sqrt` using SoftFloat

* Run the `f80_ieee_div_test` only for x86

* Replace SoftFloat version 2c with 3e

    * 3e has less bugs and more features
    * Modify the implementation in accordance

* Update SoftFloat revision and add a guard around the 80-bit div test

* Use SoftFloat for add, sub, mul operations as well

* Make rem and mod also use SoftFloat functions

    * Also add test for mod and rem, and fix behavior of rem

* Add comment about behavior of mod and rem

* Add comments for tests which have different results for mod and rem

* Simplify usage of loop variable as suggested in review

* Remove unused macro from float.c

* Implement `FMA` and `ROUND` using SoftFloat API

* Add more tests for 80-bit floats

* Change remote to a repository under rizinorg

* Add info about the rounding mode in the Doxygen for rem and mod

* Add comments in tests for rem and mod in `test_float.c`

* Use bitvectors to initialize 80-bit soft floats

    * This makes the tests more portable and hence they can be run on
      any platform

* Remove guards for f80 tests since they are portable now
2024-06-25 22:06:24 +05:30
Heersin
3dcca03ced
Enable subproject tree-sitter-c in librz/type (#4550) 2024-06-14 08:26:37 +08:00
wargio
c613ac3b70 Revert back only the changes for the threads code and ignores rz-test 2024-06-02 18:11:06 +08:00
Khairul Azhar Kasmiran
7b91fb69c2
Revert #4506 (#4519) 2024-05-27 21:50:58 +08:00
Giovanni
d19fc9d0d8
Add N_THREAD_LIMIT to limit the max number of threads (upper limit). (#4510) 2024-05-24 16:12:08 +08:00
Giovanni
64f8a5ae57
Move parse into arch. (#4342) 2024-03-07 23:50:22 +08:00
wargio
d47ceedbd3 Merge rz_asm and rz_analysis into one library but keep deprecated apis.
The tms320c64x has been merged into tms320.
2024-03-07 18:38:49 +08:00
Rot127
de1b126b5d
Disable PCRE2 JIT for Darwin (#4329) 2024-03-05 17:07:07 +08:00
Rot127
c2b9208fc2 Unset static flag if system pcre2 lib is used. 2024-03-01 01:14:07 -05:00