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 heap overflow for shiftL for bitvectors by large numbers #150

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

lsrcz
Copy link
Owner

@lsrcz lsrcz commented Oct 26, 2023

Currently, the shiftL implementation forwards the shift value directly to the underlying Integer representation for WordN and then do a masking. This is buggy as the Integer type can grow very large if the shift amount is large. This pull request fixes this and shifting by large numbers no longer yields an heap overflow error.

@lsrcz lsrcz added the bug Something isn't working label Oct 26, 2023
@lsrcz lsrcz self-assigned this Oct 26, 2023
@codecov
Copy link

codecov bot commented Oct 26, 2023

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Files Coverage Δ
src/Grisette/Core/Data/BV.hs 37.84% <0.00%> (-0.18%) ⬇️

... and 2 files with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@lsrcz lsrcz merged commit bc1fcb4 into main Oct 26, 2023
35 of 36 checks passed
@lsrcz lsrcz deleted the fix-shift-bv-large-number branch February 17, 2024 03:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant