Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ModBuiltin not able to handle n=0 #1935

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

ClementWalter
Copy link

@ClementWalter ClementWalter commented Feb 4, 2025

TITLE

Description

Fixes a bug where fill_memory would return an error if the number of elements to fill is 0.

See also the python implementation of fill_memory in cairo-lang: https://github.com/starkware-libs/cairo-lang/blob/8276ac35830148a397e1143389f23253c8b80e93/src/starkware/cairo/lang/builtins/modulo/mod_builtin_runner.py#L349-L352

Resolves #1934

Checklist

  • Linked to Github Issue
  • Unit tests added
  • Integration tests added.
  • This change requires new documentation.
    • Documentation has been added/updated.
    • CHANGELOG has been updated.

@FrancoGiachetta
Copy link
Contributor

Hi there!
The PR requires the changelog to be updated in order to pass that check.

@JulianGCalderon
Copy link
Contributor

Hi @ClementWalter! Thanks for the contribution. Could you add a test with the failing case that you mentioned?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The ModBuiltins runner is not able to manage empty add or mul
3 participants