Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take into account synthetic declarations when sanitizing a stacktrace #1437

Closed
qwwdfsad opened this issue Aug 12, 2019 · 0 comments
Closed
Assignees

Comments

@qwwdfsad
Copy link
Member

The following test

@Test
fun foo() = runBlocking {
    DebugProbes.dumpCoroutines()
}

will print these lines:

(Coroutine creation stacktrace)
	at kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt.createCoroutineUnintercepted(IntrinsicsJvm.kt:116)
	at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:26)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at definitely.not.kotlinx.coroutines.SanitizedProbesTest.foo(SanitizedProbesTest.kt:25)

Probably it is worth to make sanitizing heuristic aware of such methods and provide at least one frame with actual source, e.g.

(Coroutine creation stacktrace)
	at kotlin.coroutines.intrinsics.IntrinsicsKt__IntrinsicsJvmKt.createCoroutineUnintercepted(IntrinsicsJvm.kt:116)
	at kotlinx.coroutines.intrinsics.CancellableKt.startCoroutineCancellable(Cancellable.kt:26)
	at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
	at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
	at definitely.not.kotlinx.coroutines.SanitizedProbesTest.foo(SanitizedProbesTest.kt:25)
@qwwdfsad qwwdfsad self-assigned this Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant