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 @@ -1733,6 +1733,7 @@ class Traverser(
1733
1733
is JNewArrayExpr -> {
1734
1734
val size = (resolve(expr.size) as PrimitiveValue ).align()
1735
1735
val type = expr.type as ArrayType
1736
+ negativeArraySizeCheck(size)
1736
1737
createNewArray(size, type, type.elementType).also {
1737
1738
val defaultValue = type.defaultSymValue
1738
1739
queuedSymbolicStateUpdates + = arrayUpdateWithValue(it.addr, type, defaultValue as UtArrayExpressionBase )
@@ -2015,8 +2016,11 @@ class Traverser(
2015
2016
return castedArray
2016
2017
}
2017
2018
2019
+ /* *
2020
+ * @param size [SymbolicValue] representing size of an array. It's caller responsibility to handle negative
2021
+ * size.
2022
+ */
2018
2023
internal fun createNewArray (size : PrimitiveValue , type : ArrayType , elementType : Type ): ArrayValue {
2019
- negativeArraySizeCheck(size)
2020
2024
val addr = findNewAddr()
2021
2025
val length = memory.findArrayLength(addr)
2022
2026
You can’t perform that action at this time.
0 commit comments