Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain::wasm_validations::large_offset_validator< T > Struct Template Reference

#include <wasm_sysio_validation.hpp>

Static Public Member Functions

static void accept (wasm_ops::instr *inst, wasm_ops::visitor_arg &arg)
 

Static Public Attributes

static constexpr bool kills = true
 
static constexpr bool post = false
 

Detailed Description

template<typename T>
struct sysio::chain::wasm_validations::large_offset_validator< T >

Definition at line 68 of file wasm_sysio_validation.hpp.

Member Function Documentation

◆ accept()

template<typename T >
static void sysio::chain::wasm_validations::large_offset_validator< T >::accept ( wasm_ops::instr * inst,
wasm_ops::visitor_arg & arg )
inlinestatic

Definition at line 71 of file wasm_sysio_validation.hpp.

71 {
72 // cast to a type that has a memarg field
73 T* memarg_instr = reinterpret_cast<T*>(inst);
74 if(memarg_instr->field.o >= wasm_constraints::maximum_linear_memory)
75 FC_THROW_EXCEPTION(wasm_execution_error, "Smart contract used an invalid large memory store/load offset");
76 }
#define FC_THROW_EXCEPTION(EXCEPTION, FORMAT,...)
#define T(meth, val, expected)

Member Data Documentation

◆ kills

template<typename T >
bool sysio::chain::wasm_validations::large_offset_validator< T >::kills = true
staticconstexpr

Definition at line 69 of file wasm_sysio_validation.hpp.

◆ post

template<typename T >
bool sysio::chain::wasm_validations::large_offset_validator< T >::post = false
staticconstexpr

Definition at line 70 of file wasm_sysio_validation.hpp.


The documentation for this struct was generated from the following file: