Repository navigation
Fix crash on out-of-order GPT partitions and sanitize chunk boundaries - #143
Merged
Merged
Conversation
veluca93
force-pushed
the
disk-fixes
branch
from
September 21, 2026 15:56
011a564 to
3b25814
Compare
Virv12
approved these changes
Sep 21, 2026
Virv12
requested changes
Sep 23, 2026
| .collect::<Result<_, _>>()?; | ||
| .collect::<Result<Vec<_>, _>>()?; | ||
|
|
||
| x.sort_by_key(|p| p.byte_start); |
| return Ok(None); | ||
| } | ||
| }; | ||
| partitions.sort_by_key(|p| p.byte_start); |
veluca93
force-pushed
the
disk-fixes
branch
from
September 23, 2026 10:03
3b25814 to
7045b1b
Compare
- Sort GPT partitions by starting byte offset in parse_gpt so partitions listed out of order in the GPT array are processed in disk order, preventing an assertion crash in parse_disk. - Use integer division for NTFS cluster count calculation so cluster ranges do not exceed partition boundaries when a partition's size is not an exact multiple of the cluster size.
veluca93
force-pushed
the
disk-fixes
branch
from
September 23, 2026 10:06
7045b1b to
e19e2de
Compare
There was a problem hiding this comment.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Flash codec micro-benchmark (chunk_codec)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.
| Benchmark suite | Current: e19e2de | Previous: 84cbe4b | Ratio |
|---|---|---|---|
chunk_codec::benches::bench_flash_roundtrip_200kib |
341526.65 ns/iter (± 3188.19) |
140351.3 ns/iter (± 1637.14) |
2.43 |
This comment was automatically generated by workflow using github-action-benchmark.
Virv12
approved these changes
Sep 23, 2026
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.
Sort GPT partitions by starting byte offset in Disk::partitions and parse_gpt, preventing an assertion failure in parse_disk when partition table entries are not listed in chronological LBA order.
Also sanitize and clamp partition chunk boundaries across all filesystems: