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 uint64_t underflow #280

Merged
merged 1 commit into from
Oct 9, 2024
Merged

Conversation

bkille
Copy link
Contributor

@bkille bkille commented Oct 9, 2024

This fixes an issue where the alignment step would crash with

[wfmash::align::computeAlignments] aligned 21.03% @ 3.01e+06 bp/s elapsed: 00:00:01:31 remain: 00:00:05:41
terminate called after throwing an instance of 'std::length_error'
  what():  basic_string::_M_create

This PR fixes this specific case, but there are still other cases where underflow might be possible due to using uint64_t. I'd be in favor of converting all of the uint64_t to int64_t, since afaik there isn't any bitmasking and the 63 bits are sufficient for the coordinates.

@ekg ekg merged commit 7eb3c4b into waveygang:main Oct 9, 2024
1 check passed
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.

2 participants