Skip to content

rz_big: fix alternative backends - #6978

Draft
mochaaP wants to merge 1 commit into
rizinorg:devfrom
mcha-forks:mochaa/fix-rzbig-backends
Draft

mochaaP wants to merge 1 commit into
rizinorg:devfrom
mcha-forks:mochaa/fix-rzbig-backends

Conversation

@mochaaP

@mochaaP mochaaP commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository.
  • I made sure to follow the project's coding style.
  • I've documented every RZ_API function and struct this PR changes.
  • 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

  1. wires gmp backend again (missing since the removal of makefiles)
  2. fix building with libssl (some RZ_APIs missing in big-ssl.c)
  3. move bignum-related system imports to rz_big.h

Test plan

  1. check any code depending on the behavior described in test_rz_big_mul_multiword.
  2. review the semantics of other backends again (especially library differences), as those configurations are untested in official ci

...

Closing issues

none

wires gmp backend
fix building with libssl
@mochaaP

mochaaP commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

some code (especially evaluator) relies on the fixed-width implementation detail (it was supposed to be arbitrary width according to docs)

also in evaluator's '**' handling, comment assumes rz_big_to_int saturates but it does not.

big.c: oob write in rz_big_from_hexstr


my recommendation is to remove multibackend support since all have different semantics, and it is difficult to maintain all the configurations. maybe keep only the gmp implementation (always available if your platform has gcc)

@mochaaP

mochaaP commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

also the code currently does not compile. need fix:

  • evaluator dependency on big.c internals
  • test_big.c dependency on big.c internals

@mochaaP

mochaaP commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

i'll stop working on this for now until aforementioned issues are resolved.

@mochaaP

mochaaP commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

maybe related: #4326

@codecov

codecov Bot commented Oct 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 50.98%. Comparing base (14c2a9b) to head (5a1105e).

Additional details and impacted files

see 8 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

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

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

@notxvilka notxvilka added this to the 0.10 milestone Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants