Wire Sysio Wire Sysion 1.0.0
Loading...
Searching...
No Matches
sysio::chain::wasm_validations::nested_validator Struct Reference

#include <wasm_sysio_validation.hpp>

Static Public Member Functions

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

Static Public Attributes

static constexpr bool kills = false
 
static constexpr bool post = false
 
static bool disabled = false
 
static uint16_t depth = 0
 

Detailed Description

Definition at line 103 of file wasm_sysio_validation.hpp.

Member Function Documentation

◆ accept()

static void sysio::chain::wasm_validations::nested_validator::accept ( wasm_ops::instr * inst,
wasm_ops::visitor_arg & arg )
inlinestatic

Definition at line 109 of file wasm_sysio_validation.hpp.

109 {
110 if (!disabled) {
111 if ( inst->get_code() == wasm_ops::end_code && depth > 0 ) {
112 depth--;
113 return;
114 }
115 depth++;
116 SYS_ASSERT(depth < 1024, wasm_execution_error, "Nested depth exceeded");
117 }
118 }
#define SYS_ASSERT(expr, exc_type, FORMAT,...)
Definition exceptions.hpp:7
Here is the call graph for this function:

◆ init()

static void sysio::chain::wasm_validations::nested_validator::init ( bool disable)
inlinestatic

Definition at line 108 of file wasm_sysio_validation.hpp.

108{ disabled = disable; depth = 0; }
Here is the caller graph for this function:

Member Data Documentation

◆ depth

uint16_t sysio::chain::wasm_validations::nested_validator::depth = 0
static

Definition at line 107 of file wasm_sysio_validation.hpp.

◆ disabled

bool sysio::chain::wasm_validations::nested_validator::disabled = false
static

Definition at line 106 of file wasm_sysio_validation.hpp.

◆ kills

bool sysio::chain::wasm_validations::nested_validator::kills = false
staticconstexpr

Definition at line 104 of file wasm_sysio_validation.hpp.

◆ post

bool sysio::chain::wasm_validations::nested_validator::post = false
staticconstexpr

Definition at line 105 of file wasm_sysio_validation.hpp.


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