rizin icon indicating copy to clipboard operation
rizin copied to clipboard

Hash tables with reference count

Open Rot127 opened this issue 1 month ago • 1 comments

Your checklist for this pull request

  • [x] I've read the guidelines for contributing to this repository.
  • [x] I made sure to follow the project's coding style.
  • [x] I've documented every RZ_API function and struct this PR changes.
  • [x] I've added tests that prove my changes are effective (required for changes to RZ_API).
  • [ ] I've updated the Rizin book with the relevant information (if needed).
  • [ ] I've used AI tools to generate fully or partially these code changes and I'm sure the changes are not copyrighted by somebody else.

Detailed description

Extends the hash table with the option to count references of borrowed values/pointers.

This can be useful if the hash table is used in a cache module or some multi-threaded design.

Test plan

Added, 100% coverage of new code.

Closing issues

...

Rot127 avatar Nov 20 '25 17:11 Rot127

Codecov Report

:x: Patch coverage is 81.25000% with 6 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 46.58%. Comparing base (856c28f) to head (e5a78d7). :warning: Report is 9 commits behind head on dev.

Files with missing lines Patch % Lines
librz/util/ht/ht_inc.c 76.00% 0 Missing and 6 partials :warning:
Additional details and impacted files
Files with missing lines Coverage Δ
librz/util/ht/ht_sp.c 100.00% <ø> (ø)
librz/util/ht/ht_ss.c 81.25% <ø> (ø)
librz/util/ht/ht_su.c 100.00% <ø> (ø)
librz/util/ht/ht_up.c 100.00% <100.00%> (ø)
librz/util/ht/ht_inc.c 78.93% <76.00%> (+0.47%) :arrow_up:

... and 4 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 856c28f...e5a78d7. Read the comment docs.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 20 '25 18:11 codecov[bot]