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 @@ -1673,6 +1673,7 @@ class Traverser(
1673
1673
is JNewArrayExpr -> {
1674
1674
val size = (resolve(expr.size) as PrimitiveValue ).align()
1675
1675
val type = expr.type as ArrayType
1676
+ negativeArraySizeCheck(size)
1676
1677
createNewArray(size, type, type.elementType).also {
1677
1678
val defaultValue = type.defaultSymValue
1678
1679
queuedSymbolicStateUpdates + = arrayUpdateWithValue(it.addr, type, defaultValue as UtArrayExpressionBase )
@@ -1955,8 +1956,11 @@ class Traverser(
1955
1956
return castedArray
1956
1957
}
1957
1958
1959
+ /* *
1960
+ * @param size [SymbolicValue] representing size of an array. It's caller responsibility to handle negative
1961
+ * size.
1962
+ */
1958
1963
internal fun createNewArray (size : PrimitiveValue , type : ArrayType , elementType : Type ): ArrayValue {
1959
- negativeArraySizeCheck(size)
1960
1964
val addr = findNewAddr()
1961
1965
val length = memory.findArrayLength(addr)
1962
1966
You can’t perform that action at this time.
0 commit comments