-
Notifications
You must be signed in to change notification settings - Fork 616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add essential EIP-7756 tracing fields #2023
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -92,6 +92,18 @@ impl Jumps for ExtBytecode { | |||||||||||||||||||||||||||||||||
.offset_from(self.base.bytecode().as_ptr()) as usize | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
#[inline] | ||||||||||||||||||||||||||||||||||
fn trace_pc(&self) -> usize { | ||||||||||||||||||||||||||||||||||
match &self.base { | ||||||||||||||||||||||||||||||||||
Bytecode::Eof(_) => unsafe { | ||||||||||||||||||||||||||||||||||
// SAFETY: `instruction_pointer` should be at an offset from the start of the bytecode. | ||||||||||||||||||||||||||||||||||
// In practice this is always true unless a caller modifies the `instruction_pointer` field manually. | ||||||||||||||||||||||||||||||||||
self.instruction_pointer | ||||||||||||||||||||||||||||||||||
.offset_from(self.base.eof().unwrap().raw.as_ptr()) as usize | ||||||||||||||||||||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I have already made a change so current revm/crates/interpreter/src/interpreter/ext_bytecode.rs Lines 87 to 95 in be92e1d
and bytecode() gives self.base.eof().raw here: revm/crates/bytecode/src/bytecode.rs Lines 137 to 143 in be92e1d
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay my mistake, will see to change the |
||||||||||||||||||||||||||||||||||
}, | ||||||||||||||||||||||||||||||||||
_ => self.pc(), | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
} | ||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||
impl Immediates for ExtBytecode { | ||||||||||||||||||||||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was causing the depth field to read incorrectly when this case triggered. Not sure if here was any way to leverage it. Also, EOF only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good find! Yeah it is good fix and it is EOF only