mirror of
https://github.com/fluencelabs/wasmer
synced 2025-06-30 00:51:34 +00:00
When the const memory access is not larger than the minimum, use a runtime check.
The memory may have grown.
This commit is contained in:
@ -602,7 +602,7 @@ fn resolve_memory_ptr(
|
||||
IntPredicate::ULE,
|
||||
intrinsics.i64_ty.const_int(minimum.bytes().0 as u64, false),
|
||||
);
|
||||
if ptr_in_bounds.is_constant_int() {
|
||||
if ptr_in_bounds.get_zero_extended_constant() == Some(1) {
|
||||
Some(ptr_in_bounds)
|
||||
} else {
|
||||
None
|
||||
|
Reference in New Issue
Block a user