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 SequenceSet merging in another SequenceSet #377

Merged
merged 1 commit into from
Jan 17, 2025
Merged

Conversation

nevans
Copy link
Collaborator

@nevans nevans commented Jan 17, 2025

Most methods convert their inputs into an array of range tuples. For efficiency, SequenceSet inputs just use the internal @tuples array directly. Unfortunately, the internal tuple arrays were also reused, which could cause a variety of bugs. Fortunately, the only bug I experienced was that adding a frozen SequenceSet would result in frozen tuples being added to a mutable set. But this could also result in modifications to one SequenceSet affecting another SequenceSet!

Most methods convert their inputs into an array of range tuples.  For
efficiency, SequenceSet inputs just use the internal `@tuples` array
directly.  Unfortunately, the internal tuples arrays were also reused,
which could cause a variety of bugs.  Fortunately, the only bug I
experienced was that adding a frozen SequenceSet would result in frozen
tuples being added to a mutable set.  But this could also result in
modifications to one SequenceSet affecting another SequenceSet!
@nevans nevans added the bug Something isn't working label Jan 17, 2025
@nevans nevans merged commit 20df591 into master Jan 17, 2025
37 checks passed
@nevans nevans deleted the seqset-bugfixes branch January 17, 2025 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging this pull request may close these issues.

1 participant