From debac88a3957ff4b9ba89727ae317a8cfc816333 Mon Sep 17 00:00:00 2001 From: Igor Matuszewski Date: Wed, 25 Sep 2024 11:59:07 +0200 Subject: [PATCH] fix: Use correct bytecode in proxy error propagation check (#679) * fix: Use correct bytecode in proxy error propagation check This was a mistake done when porting; the original code is correct. * Add a changeset file --- .changeset/famous-eggs-buy.md | 5 +++++ crates/edr_napi/src/trace/error_inferrer.rs | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/famous-eggs-buy.md diff --git a/.changeset/famous-eggs-buy.md b/.changeset/famous-eggs-buy.md new file mode 100644 index 000000000..39d6a4639 --- /dev/null +++ b/.changeset/famous-eggs-buy.md @@ -0,0 +1,5 @@ +--- +"@nomicfoundation/edr": patch +--- + +fix(tracing): Use correct subtrace when detecting error error propagation across delegatecall diff --git a/crates/edr_napi/src/trace/error_inferrer.rs b/crates/edr_napi/src/trace/error_inferrer.rs index 0028a0964..6c6c71fa8 100644 --- a/crates/edr_napi/src/trace/error_inferrer.rs +++ b/crates/edr_napi/src/trace/error_inferrer.rs @@ -1173,7 +1173,7 @@ impl ErrorInferrer { _ => return Ok(false), }; - let inst = subtrace_bytecode.get_instruction(step.pc)?; + let inst = bytecode.get_instruction(step.pc)?; // All the remaining locations should be valid, as they are part of the inline // asm