-
Notifications
You must be signed in to change notification settings - Fork 161
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 bug in CycleStructurePerm
for a single cycle of length 2^16 that caused wrong answers and memory corruption
#3738
Merged
fingolfin
merged 1 commit into
gap-system:master
from
ChrisJefferson:fix-cycle-struct-perm
Nov 14, 2019
Merged
Fix bug in CycleStructurePerm
for a single cycle of length 2^16 that caused wrong answers and memory corruption
#3738
fingolfin
merged 1 commit into
gap-system:master
from
ChrisJefferson:fix-cycle-struct-perm
Nov 14, 2019
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ChrisJefferson
added
kind: bug: wrong result
Issues describing bugs that result in mathematically or otherwise wrong results, and PRs fixing them
kind: bug: crash
Issues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes)
release notes: to be added
PRs introducing changes that should be (but have not yet been) mentioned in the release notes
backport-to-4.11
labels
Nov 12, 2019
ChrisJefferson
force-pushed
the
fix-cycle-struct-perm
branch
from
November 12, 2019 12:16
82a5c29
to
11a078a
Compare
wilfwilson
approved these changes
Nov 12, 2019
fingolfin
reviewed
Nov 13, 2019
fingolfin
approved these changes
Nov 13, 2019
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me; two minor comments
CycleStructPerm overflowed a UInt2 when given a cycle of length exactly 2^16, so store the size-1 (which is what we output anyway)
ChrisJefferson
force-pushed
the
fix-cycle-struct-perm
branch
from
November 13, 2019 16:37
11a078a
to
fefc497
Compare
I believe all issues are now fixed |
Backported to stable-4.11 in commit 7d39a54 |
fingolfin
changed the title
Fix bug in CycleStructurePerm for a single cycle of length 2^16
Fix bug in Dec 5, 2019
CycleStructurePerm
for a single cycle of length 2^16 that cause wrong answers and memory corruption
fingolfin
changed the title
Fix bug in
Fix bug in Dec 5, 2019
CycleStructurePerm
for a single cycle of length 2^16 that cause wrong answers and memory corruptionCycleStructurePerm
for a single cycle of length 2^16 that caused wrong answers and memory corruption
fingolfin
added
release notes: added
PRs introducing changes that have since been mentioned in the release notes
and removed
release notes: to be added
PRs introducing changes that should be (but have not yet been) mentioned in the release notes
labels
Dec 5, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
backport-to-4.11-DONE
kind: bug: crash
Issues describing bugs that cause GAP to crash, and PRs fixing them (used for release notes)
kind: bug: wrong result
Issues describing bugs that result in mathematically or otherwise wrong results, and PRs fixing them
release notes: added
PRs introducing changes that have since been mentioned in the release notes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
CYCLE_STRUCT_PERM overflowed a UInt2 when given a cycle of length
exactly 2^16, so store the size-1 (which is what we output anyway)
This caused both wrong answers, and memory corruption.
This function could, in principle, be overhauled/simplified to use less fancy buffers, but I'm convinced by this fix and wanted something small to go into 4.11 at least.