From 27c13e9547ac55ddbc5e7a4e1ab6f1a1368075ed Mon Sep 17 00:00:00 2001 From: vms Date: Sun, 25 Apr 2021 01:21:06 +0300 Subject: [PATCH] disable check --- crates/it-lilo/src/lowerer/error.rs | 3 --- crates/it-lilo/src/lowerer/memory_writer.rs | 3 --- 2 files changed, 6 deletions(-) diff --git a/crates/it-lilo/src/lowerer/error.rs b/crates/it-lilo/src/lowerer/error.rs index f57437c..6d1d501 100644 --- a/crates/it-lilo/src/lowerer/error.rs +++ b/crates/it-lilo/src/lowerer/error.rs @@ -20,9 +20,6 @@ use thiserror::Error as ThisError; #[derive(Debug, ThisError)] pub enum LoError { - #[error("Allocator of Wasm module returns 0 which means that it's out of memory")] - AllocateWasInvalid, - #[error("{0}")] AllocatableError(#[from] AllocatableError), diff --git a/crates/it-lilo/src/lowerer/memory_writer.rs b/crates/it-lilo/src/lowerer/memory_writer.rs index c5c2e7d..5c6f10f 100644 --- a/crates/it-lilo/src/lowerer/memory_writer.rs +++ b/crates/it-lilo/src/lowerer/memory_writer.rs @@ -55,9 +55,6 @@ impl<'i, A: Allocatable> MemoryWriter<'i, A> { pub fn sequential_writer(&self, size: u32, type_tag: u32) -> LoResult { let offset = self.heap_manager.allocate(size, type_tag)?; - if offset == 0 { - return Err(LoError::AllocateWasInvalid); - } let new_mem_slice = self.heap_manager.memory_slice(DEFAULT_MEMORY_INDEX)?; self.memory.set(new_mem_slice);