Skip to content

Conversation

yanchith
Copy link
Contributor

Also, even when there was no out-of-bounds access, the log statement talked
about an incorrect submission index.

Fixes #659

Also, even when there was no out-of-bounds access, the log statement talked
about an incorrect submission index.
for i in (0..self.pending.len()).rev() {
if self.pending[i].1 < lowest_active_index {
let cmd_buf = self.pending.swap_remove(i).0;
let (cmd_buf, index) = self.pending.swap_remove(i);
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand how this could be None if we just used self.pending[i].1 in the comparison above. Do you?

Copy link
Member

Choose a reason for hiding this comment

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

nvm, I see now (facepalm)

bors bot added a commit that referenced this pull request May 18, 2020
661: Fix panic in command allocator log r=urgent a=kvark

Fixes #314
Closes #660 

Co-authored-by: Dzmitry Malyshau <[email protected]>
Copy link
Member

@kvark kvark left a comment

Choose a reason for hiding this comment

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

Thank you!
bors r+

for i in (0..self.pending.len()).rev() {
if self.pending[i].1 < lowest_active_index {
let cmd_buf = self.pending.swap_remove(i).0;
let (cmd_buf, index) = self.pending.swap_remove(i);
Copy link
Member

Choose a reason for hiding this comment

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

nvm, I see now (facepalm)

@bors
Copy link
Contributor

bors bot commented May 18, 2020

@bors bors bot merged commit a203333 into gfx-rs:master May 18, 2020
@yanchith yanchith deleted the fix-trace-allocator-oob branch May 18, 2020 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

log::trace in allocator.rs panics on out-of-bounds
2 participants