in src/jvm/main/org/jetbrains/kotlinx/lincheck/strategy/managed/ManagedStrategy.kt [1369:1398]
override fun afterReadArrayElement(
threadDescriptor: ThreadDescriptor,
codeLocation: Int,
array: Any?,
index: Int,
value: Any?
) = threadDescriptor.runInsideIgnoredSection {
if (collectTrace) {
val eventId = getNextEventId()
val threadId = threadScheduler.getCurrentThreadId()
val valueRepresentation = objectTracker.getObjectRepresentation(value)
val typeRepresentation = objectFqTypeName(value)
if (shouldTrackArrayAccess(array)) {
val tracePoint = ReadTracePoint(
context = context,
eventId = eventId,
iThread = threadId,
actorId = currentActorId[threadId]!!,
ownerRepresentation = null,
fieldName = "${objectTracker.getObjectRepresentation(array)}[$index]",
codeLocation = codeLocation,
isLocal = false,
valueRepresentation = valueRepresentation,
valueType = typeRepresentation,
)
traceCollector?.addTracePointInternal(tracePoint)
}
}
loopDetector.afterRead(value)
}