Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/ida/IdaWorkspaceThinning.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,11 @@ describe("IDA workspace input thinning", () => {
async () => {
const { bytes, target } = await largeUniversalTarget(
[
{ cpu: 0x01000007, offset: 4096, size: 8480 },
{ cpu: 0x0100000c, offset: 16384, size: 33464 },
{ cpu: 0x00000007, offset: 65536, size: 33464 },
// FAT slices honor their declared 2^14 alignment; the selected
// slice still crosses the 64 KiB read boundary.
{ cpu: 0x01000007, offset: 16384, size: 8480 },
{ cpu: 0x0100000c, offset: 32768, size: 33464 },
{ cpu: 0x00000007, offset: 81920, size: 33464 },

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Later reads lose test coverage

The new fixture no longer tests a read that starts entirely after the selected slice. The slice ends at 66232 and the file ends at 115384, so both 64 KiB reads overlap the slice. That leaves the end > start guard in copyInput untested here. This guard prevents later bytes from being copied through a negative subarray bound.

Move the final slice to an aligned offset such as 131072 to keep that case covered.

Prompt To Fix With AI
This is a comment left during a code review.
Path: src/ida/IdaWorkspaceThinning.test.ts
Line: 129

Comment:
**Later reads lose test coverage**

The new fixture no longer tests a read that starts entirely after the selected slice. The slice ends at 66232 and the file ends at 115384, so both 64 KiB reads overlap the slice. That leaves the `end > start` guard in `copyInput` untested here. This guard prevents later bytes from being copied through a negative `subarray` bound.

Move the final slice to an aligned offset such as 131072 to keep that case covered.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

],
"arm64",
);
Expand Down
Loading