more green test

This commit is contained in:
Ilya Rezvov
2023-08-21 21:15:53 -06:00
parent bb2a6cea7f
commit 5b6b043049
3 changed files with 10 additions and 4 deletions
+2 -2
View File
@@ -952,7 +952,7 @@ eval budget store FunctionInstance { funcType, moduleInstance, code = Function {
let dest = fromIntegral d
let len = fromIntegral n
dropped <- readIORef isDropped
if dropped || src + len > LBS.length bytes || dest + len > size
if (dropped && len > 0) || src + len > LBS.length bytes || dest + len > size
then return Trap
else do
mapM_ (uncurry $ ByteArray.writeByteArray memory) $ zip [fromIntegral d..] $
@@ -978,7 +978,7 @@ eval budget store FunctionInstance { funcType, moduleInstance, code = Function {
isDropped <- readIORef dropFlag
if src + len > Vector.length refs
|| dst + len > MVector.length els
|| isDropped
|| (isDropped && len > 0)
|| isDeclarative mode
then return Trap
else do