elliottt opened PR #5798 from trevor/fix-block-printing
to main
:
As a follow-up to #5780, disassemble the regions identified by
bb_starts
, falling back on disassembling the whole buffer. This ensures that instructions likebr_table
that introduce a lot of constants don't throw off capstone for the remainder of the function.
<!--Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
jameysharp submitted PR review.
jameysharp submitted PR review.
jameysharp created PR review comment:
I guess this isn't quite the right types (
usize
vs whatever is inbb_starts
) but I'd suggest something closer to this:block_starts.push(self.buffer.data().len()); for (&start, &end) in block_starts.iter().zip(block_starts.iter().skip(1)) {
jameysharp created PR review comment:
This makes a little more sense to me:
let mut block_starts = Vec::new(); if self.bb_starts.first().copied() != Some(0) { block_starts.push(0); } block_starts.extend_from_slice(&self.bb_starts);
elliottt updated PR #5798 from trevor/fix-block-printing
to main
.
elliottt submitted PR review.
elliottt created PR review comment:
Great idea!
elliottt updated PR #5798 from trevor/fix-block-printing
to main
.
elliottt has enabled auto merge for PR #5798.
elliottt merged PR #5798.
Last updated: Dec 23 2024 at 12:05 UTC