MCPcopy Create free account
hub / github.com/WasmEdge/WasmEdge / checkAccessBound

Method checkAccessBound

include/runtime/instance/table.h:61–69  ·  view source on GitHub ↗

Check whether access is out of bounds.

Source from the content-addressed store, hash-verified

59
60 /// Check whether access is out of bounds.
61 bool checkAccessBound(const uint64_t Offset,
62 const uint64_t Length) const noexcept {
63 // Due to applying the Memory64 proposal, we should avoid the overflow issue
64 // of the following code:
65 // return Offset + Length <= Limit;
66 const uint64_t Limit = TabType.getLimit().getMin();
67 return std::numeric_limits<uint64_t>::max() - Offset >= Length &&
68 Offset + Length <= Limit;
69 }
70
71 /// Grow table with initialization value.
72 bool growTable(const uint64_t Count, const RefVariant &Val) noexcept {

Callers 2

instantiateMethod · 0.45
instantiateMethod · 0.45

Calls 1

getMinMethod · 0.80

Tested by

no test coverage detected