Skip to content

Fix error handling and a percision issue in float core#6469

Open
moste00 wants to merge 1 commit into
rizinorg:devfrom
moste00:fix/float_bugs
Open

Fix error handling and a percision issue in float core#6469
moste00 wants to merge 1 commit into
rizinorg:devfrom
moste00:fix/float_bugs

Conversation

@moste00
Copy link
Copy Markdown
Contributor

@moste00 moste00 commented Jun 6, 2026

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

The following miscalenous fixes are added:

1- In librz/il/theory_fbasic, the exception-collecting code didn't handle RZ_FLOAT_E_INVALID_OP, a case block was added to handle it.

2- In librz/util/float/float.c, the code of rz_float_cast_sint was injecting the leading 1 into the conversion result of all FP formats, even though the binary80 format (used by e.g. x86) has an explicit leading 1, so it needs no injecting.

3- Also In librz/util/float/float.c, the code of rz_float_cast_sint was copying the bits from a source into a destination without caring about the relative lengths, it was changed to use the minimum length of the 2

Test plan

...

Closing issues

...

@moste00 moste00 marked this pull request as ready for review June 6, 2026 23:30
Copy link
Copy Markdown
Member

@wargio wargio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add a test

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.

3 participants