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

get_divisors(0) causes overflow error or infinite loop #3

Open
jh05013 opened this issue Mar 31, 2024 · 0 comments
Open

get_divisors(0) causes overflow error or infinite loop #3

jh05013 opened this issue Mar 31, 2024 · 0 comments

Comments

@jh05013
Copy link

jh05013 commented Mar 31, 2024

On debug build, get_divisors(0) gives:

thread 'main' panicked at /rustc/79e9716c980570bfd1f666e3b16ac583f0168962\library\core\src\ops\bit.rs:496:1:
attempt to shift left with overflow

On release build, it runs an infinite loop.

I made a new crate which resolves this, but posting it here so that people can track down the problem.

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

No branches or pull requests

1 participant