Check whether access is out of bounds.
| 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 { |
no test coverage detected