Skip to content

Commit 14fba8f

Browse files
authored
fix atomicfu instrumentation rules (exclude only atomics) (#462)
Signed-off-by: Evgeniy Moiseenko <[email protected]>
1 parent 966b621 commit 14fba8f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/jvm/main/org/jetbrains/kotlinx/lincheck/transformation/LincheckJavaAgent.kt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,11 @@ internal object LincheckClassFileTransformer : ClassFileTransformer {
429429
if (className.startsWith("kotlin.coroutines.")) return true
430430
return false
431431
}
432-
if (className.startsWith("kotlinx.atomicfu.")) return false
432+
// We do not instrument AtomicFU atomics.
433+
if (className.startsWith("kotlinx.atomicfu.")) {
434+
if (className.contains("Atomic")) return false
435+
return true
436+
}
433437
// We need to skip the classes related to the debugger support in Kotlin coroutines.
434438
if (className.startsWith("kotlinx.coroutines.debug.")) return false
435439
if (className == "kotlinx.coroutines.DebugKt") return false

0 commit comments

Comments
 (0)