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

Avoid OverflowError in mpz.__rshift__() #525

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

skirpichev
Copy link
Contributor

Closes #524

@skirpichev skirpichev marked this pull request as draft October 17, 2024 07:26
@skirpichev
Copy link
Contributor Author

skirpichev commented Oct 17, 2024

@casevh, second patch removes scripts/mp_bitcnt_t.diff, thus I'm marking this as a draft.

It's possible to implement this pr in other way, but I think it triggers a bug in the patch. I think that proper support for 64-bit mp_bitcnt_t on win64 1) requires a more work, 2) we should submit patch to the upstream first.

@casevh
Copy link
Collaborator

casevh commented Oct 28, 2024

What bug is triggered in the mp_bitcnt_t patch? A previous bug that I reported upstream was fixed within a few days.

@skirpichev
Copy link
Contributor Author

What bug is triggered in the mp_bitcnt_t patch?

See failed job: https://github.com/aleaxit/gmpy/actions/runs/11379818079/job/31657941881

It's on Windows, I can't reproduce this. I guess, mpz_fdiv_q_2exp() make some assumptions on max value of the last argument.

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.

mpz(1)>>111111111111111111111 raises OverflowError
2 participants