From c90b157a241e4cbc5ca70e945b7f0ceb53de3c3f Mon Sep 17 00:00:00 2001 From: Jan Bujak Date: Fri, 10 May 2024 13:57:15 +0000 Subject: [PATCH] Handle invalid jumps --- crates/polkavm/src/compiler.rs | 10 +++++++--- crates/polkavm/src/compiler/amd64.rs | 8 ++++---- crates/polkavm/src/interpreter.rs | 9 ++++++--- crates/polkavm/src/utils.rs | 5 +++++ 4 files changed, 22 insertions(+), 10 deletions(-) diff --git a/crates/polkavm/src/compiler.rs b/crates/polkavm/src/compiler.rs index 10d966ab..6911cc31 100644 --- a/crates/polkavm/src/compiler.rs +++ b/crates/polkavm/src/compiler.rs @@ -349,15 +349,19 @@ impl<'a, S> CompilerVisitor<'a, S> where S: Sandbox { log::trace!("Compiling {}", self.current_instruction(code_offset)); } - fn get_or_forward_declare_label(&mut self, code_offset: u32) -> Label { + fn get_or_forward_declare_label(&mut self, code_offset: u32) -> Option