Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Mapping from an empty
ChainedVectorinto a nonempty destination reads a missing source chunk. Empty chunks added byappend!orprepend!can cause the same invalid read: the slow path keeps the chunk count from before cleanup removed those chunks.Return early for an empty source and refresh the source chunk count after cleanup. Regression tests cover empty sources, public empty-chunk mutations, unchanged destination tails, and callback counts. The existing length guard and matching-chunk fast path stay intact.
Validation: 84 focused checks pass on Julia 1.6.7 and 1.12.6 with bounds checks disabled; the baseline fails both reproductions with bounds checks enabled. The updated full Julia 1.12.6 suite passes 25,084,248 checks. Independent Julia 1.13 checks pass 9,430 cases for the final fix and another 9,430 with #116, including aliases and mixed chunk layouts. A warmed nonempty mapping control allocates 0 bytes. CI covers Julia 1.3 and Windows x86.
This fixes the chained-source overload; #116 handles short ordinary-vector sources.
Co-authored by Codex