File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
utbot-framework/src/main/kotlin/org/utbot/engine Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1683,6 +1683,7 @@ class Traverser(
1683
1683
is JNewArrayExpr -> {
1684
1684
val size = (resolve(expr.size) as PrimitiveValue ).align()
1685
1685
val type = expr.type as ArrayType
1686
+ negativeArraySizeCheck(size)
1686
1687
createNewArray(size, type, type.elementType).also {
1687
1688
val defaultValue = type.defaultSymValue
1688
1689
queuedSymbolicStateUpdates + = arrayUpdateWithValue(it.addr, type, defaultValue as UtArrayExpressionBase )
@@ -1965,8 +1966,11 @@ class Traverser(
1965
1966
return castedArray
1966
1967
}
1967
1968
1969
+ /* *
1970
+ * @param size [SymbolicValue] representing size of an array. It's caller responsibility to handle negative
1971
+ * size.
1972
+ */
1968
1973
internal fun createNewArray (size : PrimitiveValue , type : ArrayType , elementType : Type ): ArrayValue {
1969
- negativeArraySizeCheck(size)
1970
1974
val addr = findNewAddr()
1971
1975
val length = memory.findArrayLength(addr)
1972
1976
You can’t perform that action at this time.
0 commit comments