[Migrated] Incorrect index validation
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3.4k
- Forks
- 125
- PR merge metrics
- No merged PRs in 30d
Description
Issue automatically imported from old repo: https://github.com/EmbarkStudios/rust-gpu/issues/1093
Originally creatd by atynagano on 2023-09-21T11:51:47Z
if byte_index + mem::size_of::<T>() as u32 > (mem::size_of::<u32> * self.data.len()) as u32
Isn't the right-hand side multiplied by 4 because data is &[u32]?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in crates/spirv-std/src/byte_addressable_buffer.rs at lines 73-78 and inspect how the &[u32] data length is converted to a byte bound. Confirm whether the right-hand side accounts for the size of each u32; done means the index validation uses the correct byte extent and the existing behavior is checked.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100