We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 706fda6 commit 34c4913Copy full SHA for 34c4913
Sources/Fuzzilli/Base/ProgramBuilder.swift
@@ -3492,7 +3492,12 @@ public class ProgramBuilder {
3492
let dynamicOffsetValue = self.randomNonNegativeIndex(upTo: memSize)
3493
let dynamicOffset = memoryTypeInfo.isMemory64 ? function.consti64(dynamicOffsetValue)
3494
: function.consti32(Int32(dynamicOffsetValue))
3495
- let staticOffset = self.randomNonNegativeIndex(upTo: memSize) % (memSize - dynamicOffsetValue)
+ var staticOffset: Int64
3496
+ if (dynamicOffsetValue == memSize) {
3497
+ staticOffset = 0
3498
+ } else {
3499
+ staticOffset = self.randomNonNegativeIndex(upTo: memSize) % (memSize - dynamicOffsetValue)
3500
+ }
3501
3502
return (dynamicOffset, staticOffset)
3503
}
0 commit comments