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 @@ -1709,6 +1709,7 @@ class Traverser(
1709
1709
is JNewArrayExpr -> {
1710
1710
val size = (resolve(expr.size) as PrimitiveValue ).align()
1711
1711
val type = expr.type as ArrayType
1712
+ negativeArraySizeCheck(size)
1712
1713
createNewArray(size, type, type.elementType).also {
1713
1714
val defaultValue = type.defaultSymValue
1714
1715
queuedSymbolicStateUpdates + = arrayUpdateWithValue(it.addr, type, defaultValue as UtArrayExpressionBase )
@@ -1991,8 +1992,11 @@ class Traverser(
1991
1992
return castedArray
1992
1993
}
1993
1994
1995
+ /* *
1996
+ * @param size [SymbolicValue] representing size of an array. It's caller responsibility to handle negative
1997
+ * size.
1998
+ */
1994
1999
internal fun createNewArray (size : PrimitiveValue , type : ArrayType , elementType : Type ): ArrayValue {
1995
- negativeArraySizeCheck(size)
1996
2000
val addr = findNewAddr()
1997
2001
val length = memory.findArrayLength(addr)
1998
2002
You can’t perform that action at this time.
0 commit comments