100 Commits
Author SHA1 Message Date
Rot127 3a5ca619bf RzAbstInt clean up: renaming, function moving, labeler (#6803) 2026-10-11 18:15:38 +00:00
Rot127 f053eae231 Upgrade to PCRE2 10.49 2026-09-28 20:17:35 +01:00
Rot127 7d75062276 Early return on attempt to lift from non executable memory. (#6804) 2026-09-27 18:07:53 +00:00
Rot127 51cd1b633c Mention that ao prints the instruction details, so it can be found with the command search. (#6694) 2026-09-24 19:46:46 +00:00
Rot127 598a8443ba Fix bindgen linter issues (#6780) 2026-09-24 13:42:05 +00:00
Rot127 8537e913fe Remove left over doxygen (#6747) 2026-09-15 22:55:26 +01:00
Rot127 f5c902a5b6 Bump PCRE2 to 10.48 (#6692) 2026-09-03 14:29:29 +00:00
Rot127 c4f9b4245e Remove duplicate abl test and cover ablj in another test. (#6693) 2026-09-02 18:11:05 +00:00
Rot127 192b771e1d Fix aar ignoring vmap memory. (#6664)
That fixes a really annoying bug of aar ignoring any vmap.
If core_search_for_xrefs_in_boundaries() gets an interval which lies within a vmap,
rz_io_size() returns the size equivalent mmap.
Which can be smaller and make the if case fails.

This seems to be a bug for all virtual files mapped in memory.
If a virtual file of size 0x100 is mapped to a memory map of
size 0x180, it creates a vmap of 0x100 for the file content and
a 0x80 mmap for the empty bytes.
These maps are names vmap.filename, mmap.filename.

rz_io_size() now seems to only ever return the size of the mmap.
I don't know why it does that.
And because it is one of the stone age functions I am not going down there to look.

This bug breaks aar for Qualcomm split firmware images (.mdt).
Removing this check should not have an impact, because I added
a check for the memory read.
2026-08-29 17:49:22 +00:00
Rot127 38d0a78e36 Add example to change the search prefix temporarily. (#6662) 2026-08-12 09:24:25 +00:00
Rot127 6f264e7019 Improve default behavior of string search (NUL = new line) (#6573)
* Allow to set dotall and multiline flag also for normal regex patterns.

* String search sees NUL as newline by default.

That is the most intuitive option for binary searches.
The behavior can still be changed. An example us added.
2026-08-05 17:18:11 +00:00
Rot127 e8818d1888 Bump Capstone v6 to Alpha10 (#6644)
* Bump Capstone v6 to Alpha10

* Bump capstone-next to latest commit.

* Remove Alpha check for upper case enums.

* Add Xtensa ESP32s3 CPU.

Moves the asm tests to a properly configured test file.

* Document db/asm file naming

* Fix leaks
2026-08-04 13:00:50 +00:00
Rot127 f05d8e228b Fix call flag in CFG json output. (#6639) 2026-07-29 14:54:41 +00:00
Rot127 dd618bb30a Hexagon fix for abstract interpretation overestimation of jump targets (#6634)
The jump addresses of call and jump instructions are now written to their own
and unique local variables. Before this, all jump instructions wrote to the
same local variable.

This was a problem for abstract interpretation: Because if multiple writes to
the same local var happen due to a previous TOP condition, the local variable
content is also TOP. If the jump target is TOP, the interpreter can't follow it
anymore.

Added tests for all the funny packet configurations with 0-2 jumps in it.
2026-07-27 22:50:13 +02:00
Rot127 202a827785 Fix wrong branch name in CI (#6571) 2026-06-28 12:49:46 +08:00
Rot127 39ab034d28 Don't print meta items which are not at the current seek. (#6559)
* Don't print meta items which are not at the current seek.

The old code tried (unsuccessfully) to print _any_ meta item _covering_ the seek (ds->at).

There seems to be several bugs getting triggered with that.
One of them giving the behavior of https://github.com/rizinorg/rizin/issues/6556.

If the current seek is in a _data_ region, the disassembler logic doesn't care.
It just assumes that RzAsmOp.size is equivalent to the size of the objects there.
Even though there are only Meta items.

But since some meta items are like 4K bytes, RzAsmOp.size gets
trimmed down.
Anyways, that completely messes up the size calculation (as can be seen in the issue),
and the navigation.
I couldn't figure out where stuff broke.
But the library closes and I have to leave, so I push that.

That "fix" makes it at least behave somewhat consistently.

* Fix leaks

* Fix and add interactive test
2026-06-27 10:36:12 +00:00
Rot127 2478a95874 Fix performance for GOT offset lookup via a lookup table. (#6555) 2026-06-24 11:30:00 +08:00
Rot127 0599c98e76 Add hint for -F, if multiple bin plugins can load the binary. (#6548) 2026-06-22 11:24:46 +00:00
Rot127 da228d11cf Add all call and other xrefs to the abl output (#6269)
* Ensure call targets are only added once for each block.
* Fix abl printing correct xrefs
2026-06-21 13:02:40 +08:00
Rot127 9ddf0ab9ab Fix Leak checking workflow (#6532)
* Fix leak workflow by passing changes as file instead of env variables.
* Upload PR changes as file
2026-06-20 17:56:41 +00:00
Rot127andDhruv Maroo 110c812219 librz/arch/x86: fix ADC, AND, OR, SBB RzIL lifting (#6524)
* Cast operands for AND and OR instructions to the correct width
* Add missing operand casts for SBB and ADC.
* Add flawed instructions to asm tests

---------

Co-authored-by: Dhruv Maroo <[email protected]>
2026-06-18 11:07:43 +08:00
Rot127 14b250b478 Fix several OOB reads (#6462)
* Fix OOB read for v810
* Fix heap buffer overflows for jvm
* Fix shadowed len and heap buffer overflow for 6502
* Fix OOB reads for i8080
* 6502_test
* NULL field
* Convert asserts to simple returns.
* Fix tests
2026-06-06 02:37:25 +08:00
Rot127 6d7c38cf5b Graph - (tiny) performance improvements (#6382)
* Fix revert if adding a node failed.

* Reduce allocations by keeping only a single RzGraphEdge object per edge around.

* Add benchmark for graph deletion and addition of nodes/edges

* Use rz_pvector_remove_at_unsorted to save some runtime.

* Use realloc and memmove for matrix graphs on capacity increase.

* Add helper to determine memory usage.

* Add benchmark

* Revert matrix capacity extension to simple and jsut as fast loop.

* Missing type annotations
2026-05-31 22:00:25 +00:00
Rot127 2de65410ef Return early from sleep() functions in case of 0 sleep time. (#6429) 2026-06-01 01:47:39 +08:00
Rot127 67c633e8ca Dist leaks & RISCV CI build (#6432)
* Fix leaks

* Fix linking issue on RISCV CI job

* Fix leak of all configs if they are reset.
2026-05-30 12:07:55 +00:00
Rot127 691bd504c6 Add missing NULL check before passing the edge to cb(). (#6428) 2026-05-29 22:53:49 +02:00
Rot127 ea146cb14d Delete overflow test because FreeBSD times out on it. (#6412) 2026-05-28 16:03:38 +00:00
Rot127 c6820479c6 test/bench: add geometric stats to benchmarks (#6403)
* Add option to replace (geometric) invalid values with another value.
* Add geometric Mean and Std Dev to benchmarks.
* Add Doxygen documentation
* Add a README to the bench dir as intro.
2026-05-26 16:15:02 +08:00
Rot127 702250eb4f test/bench: measure standard deviation for benchmarks (#6390)
* Add Welfords square of sums algorithm for variance and std deviation calculations.
* Add standard deviation to benchmarks
* Simplify Welford
* Add geometric mean and standard deviation to Welford Sums
2026-05-25 05:08:06 +08:00
Rot127 12a16c812b Add order ignoring remove_at version with better performance. (#6389)
* Add order ignoring remove_at version with better performance.

* Optimize rz_vector_swap by using stack memory for small elements.

* Add benchmark for rz_vector_swap
2026-05-22 20:54:49 +00:00
Rot127 75cd389b5c Graph - API changes to enum (#6349)
* Refactor del_edges to use RzGraphStatus.

* Refactor del_edge() to use RzGraphStatus.

* Refactor update_edge() to use RzGraphStatus.

* Refactor has_edge() to use RzGraphStatus.

* Refactor add_edge() to use RzGraphStatus.

* Fix leak of b

* Fix leak of xref list

* Fix leaks of analysis ops

* Address review comments

* Inlcude clean up

* Fix invalid free

* Add tests with node and edge data.

* Extend tests
2026-05-22 13:45:18 +00:00
Rot127 8a76ab1733 Bump demangler to latest commit + fix useless code (#6381)
* Update libdemangle to fix reachable double free
* Get some return on an energy burning loop.
2026-05-18 23:20:19 +08:00
Rot127 1adba3227a librz/util/graph: various improvements
* GRAPH: Add rz_graph_add_get_node() and refine API.
* GRAPH: Remove unused, and rename parameters.
* Improve doxygen.
* Implement rz_graph_del_edges()
* Rename rz_graph_node_get_hash_id() to rz_graph_node_get_hash_id() to make clear what identifier is returned.
* Simplify node identification.

Removes the option to have two sources of identifiers (node data or other identifier data).
Changes the API to use the hash id instead of a pointer to data.

* Fix type annotations.
* Remove duplicate function.
* Fix invalid asserts.
* Set flag if node was present.
* Grow by a factor of 1.25. Exponential growth quickly leads to OOM.
* Remove the edge index again to not remove reduce the main advantage of an adjacency matrix
* Refactor list based graph to use vectors instead of hash maps for edges.
* Fix heap-use-after-free
* Add an rz_graph_update_edge function.
* Add function to print graph as dot graph.
* Add warning about del_edges runtime.
* Refactor add_node to use RzGraphStatus.
* Refactor del_node to use RzGraphStatus.
* Use cast-macro to prevent ASAN issues.
2026-05-16 19:12:01 +08:00
Rot127 1750cc27fc librz/bin/omf: fix build warning (#6341) 2026-05-13 00:47:23 +08:00
Rot127 598e4c0ce8 Use libdemangle commit with fixed CVE. (#6340) 2026-05-12 09:41:04 +08:00
Rot127 e6d0937c8a Fix OOB read in OMF format plugin (#6336)
* Fix OOB read of section due to invalid bounds check.
* Move array offset to variable for readability.
2026-05-11 23:53:51 +08:00
Rot127 045fff363b Fix double free and reject invalid values for search.in (#6327) 2026-05-11 13:01:53 +08:00
Rot127 82f028018a Fix rz_vector_set() behavior to match the rz_pvector version one. (#6274)
* Fix rz_vector_set() behavior to match the rz_pvector version one.
* Use existing vector functions for setting elements.
2026-04-26 22:20:22 +08:00
Rot127 a74ed707ea Several rz_vector improvements. (#6250)
* Add getter for vector capacity.

* Make rz_(p)vector_assign_at consistent in behavior.

* Document rz_vector_clear

* Move doxygen for rz_vector_flush to definition.

* Add rz_vector_purge for clearing, but capacity keeping.

* Rename flush -> take_array to signal ownership transfer.
2026-04-22 08:20:03 +00:00
Rot127 a489ff8b60 Change benchmark table header (#6265)
* Change benchmark table header to prevent misconceptions that we measure the CPU ops counter.

* Preserve unit for average iteration duration.
2026-04-21 18:37:36 +00:00
Rot127 64aefa87cc Simplify AI checks. (#6261)
* Remove AGENTS.md check

* Isolate usage of GITHUB_TOKEN into a single step which doesn't echo.

* Remove unused steps.
2026-04-21 14:16:23 +00:00
Rot127 346bb6375f librz/arch: fix some memory leaks (#6240) 2026-04-17 00:09:52 +08:00
Rot127 02f3ae94d2 Fix leak of agraph (#6226) 2026-04-14 13:22:10 +08:00
Rot127 34cd4ea304 Wrap assert expressions into RZ_UNLIKELY() (#6225) 2026-04-13 20:50:50 +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
Rot127 d474c1f2a9 Fixes the leak checking workflow. (#6205)
- It uses now the changed lines provided by the get_real_shas workflow,
  which prevents failing if PR gets out of sync with base branch.
- Fixes a bug in lsan_check.py which used the wrong line number as reference.
- Moves the whole leak detection workflow out of ci.yml to simplify it.
- Uploads the leak stack traces as artifact for local analysis.
2026-04-13 09:36:24 +00:00
Rot127 edb7878a0d Provide line changes of all PR commits. (#6210) 2026-04-11 21:53:42 +00:00
Rot127 cc49fd52cd Add rz_vector_find_sorted() for O(log n) search in vectors. (#6190) 2026-04-11 10:30:25 +00:00
Rot127andHeersin b11bb9d23a refactor: add hashtable-based RzGraph implementation (#6152)
* Basic implement of list based and matrix based graph

Add comments

Basic support for list and matrix based graph refactor

Add rz_graph_*_new node and edge API

Modify calling for rz graph edge data

Add dfs and visitor mode

Add new get nth neighbours

Add unit test and wrapper for get edges

Bug fixed and unit test

Solve TODO about better semantic of get nodes

Doc RZ_API and other functions, split impl to new files

[cannot build] remove old graph impl and rename new graph API

* Rewrite and replace agrach, cgraph, drawable_graph, il_graph with new API

* Refactor graph API and fix unit test and multiple leaks

Update Wrapper for graph identifier

Ordered Nodes in graph drawable

Fix icfg and several agraph refactor issues

Use kahn to get topo sort in assign_layers

Introduce khan for assign_layer and find DAG cycle and backedges in algorithm

* Fix self loop and update db test

* Solve request changes

* Fix cbpf db

* Fix test graph warning in testing NULL deletion

* Fix mismatched rz_agraph_compute_layout nonnull

* Fix memleak

* Clean and fix code

* Fix memleak in graph free

* Fix memleak in matrix implement

* Add bindgen doc

* Fix memleak in early exit

* Fix rz-bindgen warning comments

* Make graph structures private.

* Fix Windows C2036

* Fix typo in type annotation.

* Add new type annotations for RzGraph and HtPP

---------

Co-authored-by: Heersin <[email protected]>
2026-04-08 04:01:40 +08:00
Rot127 d7bc9584e2 Fix rz-bindgen build for latest rz_analysis_t refactor. (#6168)
* Move typedef to the top to fix rz-bindgen parsing.

* Fix order of endif (cpp must be second to last).
2026-04-07 03:20:02 +08:00
Rot127 b961360d13 Remove unused declaration (#6165) 2026-04-06 17:58:34 +00:00
Rot127 f84510dc08 Add rz_set_u_take(). (#6137) 2026-04-04 12:04:25 +00:00
Rot127 a1012b5305 Improve performance of rz_bv_set_from_Xt64() at least for the value 0. (#6147) 2026-04-04 12:01:44 +00:00
Rot127 c6d566a44a Fix failing of workflow if a PR or the base branch has more than 10 commits. (#6117)
I tried several ways to fix this issue more elegantly.
But I either was too stupid, too tired to do it right, or it got too complex.
The script fails because the PR "base" branch and the PR HEAD
have no merge-base commit in the shallow clone Github does.

If a PR has more than 10 commits, the workflow fails because
the fetching didn't get enough commits to reach the merge-base.

Anyways, this is the simple solution.
Fetch 200 commits at once and done.
The workflow will fail if a PR has more than 200 commits
or the base branch has 200+ commits since creation of the
PR. But this rare and almost always requires a rebase
anyways. So this is the simplest fix.
2026-03-29 09:49:03 +08:00
Rot127 d8fec294f7 librz/arch: update Hexagon to v81 + HMX Extension (#6041)
* Update to v81
* Add HMX tests
* Add HMX extension instructions.
* Update patterns with more special register names.
* Fix and extend token patterns.
* Regenerate with RzIL
* Add missing extension description.
2026-03-27 13:36:03 +08:00
Rot127 6d50c5ac14 Fix leaks of table (#6106) 2026-03-27 11:25:27 +08:00
Rot127 e675b5efa6 Fix leaks of keyword list and venv (#6094) 2026-03-26 01:58:42 +08:00
Rot127 5d15b1295e Move get_boundary functions without module dependencies to RzIO. (#5508)
* Add boundary getter tests.
2026-03-25 14:34:07 +00:00
Rot127 16357f4be0 Fix workflow for multi-line commit messages. (#6068) 2026-03-22 15:25:20 +00:00
Rot127 5e020dde45 Add LLM checking workflow again. (#6038) 2026-03-22 11:46:42 +00:00
Rot127 db9a9cec71 Document allowed macro usage. (#6060) 2026-03-22 11:46:14 +00:00
Rot127 964335bcf6 librz/bin/elf: Add R_PPC64_RELATIVE and R_PPC64_ADDR64. (#6058) 2026-03-21 13:50:43 +08:00
Rot127 c187aeeb5b Remove possibly vulnerable LLM check workflow. (#6032) 2026-03-13 17:19:34 +00:00
Rot127 a0da72a5c9 Add AGENTS.md with requirement to disclose agent authorship and flag PRs with detected AI usage. (#6025)
* Add AGENTS.md with requirement to disclose agent authorship.
* Check for edits to AGENTS.md
* Add PR label on detected AI authorship.

This PR adds an automated check if a contributor used an AI Agent to generate code.

It does this by:
- Adding an AGENT.md requesting the Agent to add a "co-authored by" line to each commit message it generates.
- An added workflow (`llm_check.yml`) runs to check for any commit having such a matched line in it.
- If it finds it, it adds the `AI/LLM` label. The label IS NOT removed automatically if a force push changes the commit message.

The additional `get_real_pr_shas.yml` is a requirement sadly.
It is currently impossible to get the commit the PR is based on via Github APIs.
The variables `github.base_ref` or `github.pull_request.base.sha` either return the commit hash when the PR was created (breaks after rebase) or the new HEAD of the base branch after something unrelated was merged (see: https://github.com/actions/runner/issues/1689).

This makes it effectively impossible to get the output of `git log actual_pr_base..HEAD` via the Github API.
2026-03-13 15:00:14 +00:00
Rot127 2b58fae646 Make RzAnalysisMetaType an integer enum. (#5839) 2026-03-08 03:18:40 +08:00
Rot127 ec02889e9c RzIL: Hash Pure variable names to make them more suitable as hash table keys. (#5971)
* Pre-compute DJB2 hash of VAR name for internal hash map key usage.

* IL VARS hash: Hash variable name.

* Add tests
2026-02-27 11:51:35 +00:00
Rot127 42dbdd7900 Fix meson build warning about empty config data. (#5957) 2026-02-22 21:10:09 +00:00
Rot127 d7111d056c librz/util: add rz_vector_contains() and rz_vector_insert_sorted() (#5892)
* Add rz_vector_contains().
* Add rz_vector_insert_sorted().
* Pointer arithmetic fix for Windows.
2026-02-11 02:45:12 +08:00
Rot127 6a8d2ecf57 Check for empty vector to prevent OOB reads and writes. (#5591)
* Check for empty vector to prevent OOB reads and writes.

* Add tests to check for OOB reads/writes.
2026-02-10 16:57:12 +00:00
Rot127 38407306b3 Fix leaks of RzILMem buffers and enabling RzILMem to take buffer ownership. (#5739)
The previous assumption of RzILMem was that the buffer is not owned by it.
This made sense, because in the beginning it only held an RzIO buffer.

But the Xtensa and Sparc RzAnalysisILInitCallback definition initializes
an additional RzILMem object. This additional RzILMem has a sparse buffer in both cases.
The Xtensa and Sparc plugin pass the sparse buffer to RzILMem with the assumption that it takes ownership.
They have to, because there is no fini() version of RzAnalysisILInitCallback in which they could free the buffer.
There are also no API functions to free the buffer in RzILMem.
So the plugins don't have a nice way to clean it up in a theoretical fini() callback.

This commit fixes the leak by splitting rz_il_mem_new() into two version.
One to taking the ownership of the buffer, one borrowing it.
This seems the most natural solution, because buffers can abstract from
all kind of backends (RzIO, a file, some memory etc.).
Each time the ownership of the buffer is different.
So the creator of rz_il_mem_new_*() can decide what buffer with what ownership they pass.
2026-02-10 15:38:51 +00:00
Rot127 73b8660489 Disable debug logs of Hexagon instruction cache completely. (#5652) 2026-02-10 23:17:13 +08:00
Rot127 dcb4acf661 Rename clean -> clear to match common API names. (#5891) 2026-02-08 15:03:52 +00:00
Rot127 0d5e300874 librz/util: add clean() function to hash tables and sets. (#5889) 2026-02-08 14:42:48 +08:00
Rot127 aaf9588c44 Constify rz_set_u/s_contains() (#5888) 2026-02-08 14:40:14 +08:00
Rot127 7b129bc98d analysis: fix leaks of analysis op. (#5858) 2026-02-02 11:44:35 +08:00
Rot127 17de98e372 shell: fix leak of iterator in help command (#5848) 2026-01-29 12:14:34 +08:00
Rot127 65ef6e3ed9 Fix return type description. (#5838) 2026-01-25 13:11:11 +00:00
Rot127 4675f5cafe Add getter for the current log level. (#5807)
The getter is useful if a module outputs debug logs buts also some updated status update in a single line with rz_cons_printf("\r...").
The status update should not happen if the log level is below warning.
2026-01-23 18:52:45 +00:00
Rot127andReid Kleckner 521353b6fe Forbid usage of AI tools for good-first-issues. (#5829)
Co-authored-by: Reid Kleckner <[email protected]>
2026-01-23 13:06:24 +08:00
Rot127 3c44884a9b Fix semantical IL bug of unconditional jumps executing NOP in delayed slot. (#5764) 2026-01-16 22:47:51 +08:00
Rot127 341e59a629 Fix error case of Hexagon asm/analysis plugin. (#5797)
Before it always returned a positive number,
even if the instruction didn't decode properly due to an error.
2026-01-15 23:38:11 +08:00
Rot127 f665dde999 Fix leak of data in get_call() (#5789) 2026-01-13 14:03:45 +00: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
Rot127 960dc17b23 util/bitvector: return successfully for bit vector shift of 0. (#5747)
The result of shift with 0 is perfectly well defined.
2026-01-08 23:27:38 +08:00
Rot127 4213ddfecc Fix reachable invalid state, for bitvector in-place casts from large to large. (#5746) 2026-01-08 13:47:53 +00:00
Rot127 26e87cbb79 librz/arch/sparc: fix leaks in the Sparc IL implementation. (#5740) 2026-01-07 12:26:50 +08:00
Rot127 a89bbe5cf2 librz/util: implement inplace rz_bv_div and rz_bv_mod. (#5742) 2026-01-07 12:26:06 +08:00
Rot127 1128efc8ee space: fix leak of Capstone handle and state. (#5738) 2026-01-07 01:03:44 +08:00
Rot127 6936186c29 Replace legacy RZ_MODE_ enums with RZ_OUTPUT_MODE in legacy search. (#5734) 2026-01-06 02:44:10 +08:00
Rot127 aad95fb2fd shell: remove /cc command (#5716)
The command was untested. And while it still could be useful less code is probably better.
Additionally, finding collisions is a rather expensive problem,
better left to optimized algorithms and implementations.
2025-12-31 23:59:21 +08:00
Rot127 f79fe79bad refactor: remove globals in cmd_search.c (#5713)
* Move preludecnt to legacy RzSearch object to remove more global state.
* Replace global c with local one.
2025-12-31 02:37:43 +08:00
Rot127 d260e00c52 Document and explain ownership of the RzILMem buffer. (#5658) 2025-12-27 02:47:15 +08:00
Rot127 472819aa92 librz/util: add in-place bitvector operations (#5569)
* Add an in-place addition of bitvectors.

* Decouple _elem_len from assumption it has just enough bytes to hold len in bits.

* Add in-place copy of bits.

* Use default copy bits bitvector function.

* Mark stack allocated bit vector.

* Add inplace variant of complement_1

* Implement inplace bitvecotr not.

* Add inplace variant of rz_bv_and

* Implement inplace variant of rz_bv_or

* Implement inplace variant of rz_bv_xor

* Constify rz_bv_lsb/msb

* Implement inplace variant of rz_bv_neg

* Fix inplace add. Add inplace SUB

* Remove prefix

* Remove invalid const

* Implement in-place casting of bit vectors.

* Add a hash test

* Fix unnecessary &

* Prevent OOB reads & writes by copying only the minimum of bytes.

* Add inplace MUL

* Add ble version for bitvector set/get with bytes.

* Add documentation for inplace bitvector functions.

* Add bench of add/sub() and sub/add_inplace().

* Remove rz_bv_copy_nbits_inplace because it was the same as rz_bv_copy_nbits.
2025-12-23 13:56:06 +08:00
Rot127 232e2a1be3 Fix another edge case of Hexagon IL lifting. (#5645)
If a packet was pushed out of the cache, it can be decoded as invalid, although it is valid.
Then it is marked as such according to some heuristic.
But the get_pkt_op parameter was not set in this case, which further down let
the plugin return an EMPTY() effect.
2025-12-20 15:27:34 +00:00
Rot127 83a8c21394 Add name getter for RzIL effects. (#5643) 2025-12-19 03:11:01 +08:00
Rot127 092dc95446 Fix reading from cache in rz_io_nread_at(). (#5618)
The cache read must read within the mapped region and not beyond.
Otherwise it would go against the documentation of rz_io_nread_at().
rz_io_cache_read() internally doesn't know about map boundaries so
the length parameter passed to it in rz_io_nread_at()
should only read 'ret' number of bytes.

To give somewhat more introspective what rz_io_cache_read() does,
the return value meaning was changed to success/failure
and an out parameter was added to get the number of bytes read.
2025-12-16 03:00:09 +08:00
Rot127 b58e9a6a4a ci: lsan - wrap git command into try block for debugging (#5595) 2025-12-16 00:08:44 +08:00
Rot127 2e63297dd2 Fix leak of asmop tokens. (#5615) 2025-12-13 22:14:35 +08:00
Rot127 ab029a96bf analysis/rzil: fix memory leak (#5586) 2025-12-08 15:11:18 +08:00
Rot127 65040bb7ae Add helper to check if a thread terminated. (#5583) 2025-12-08 04:37:01 +08:00