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

[core] JadxRuntimeException in pass: RegionMakerVisitor #2262

Open
pubiqq opened this issue Sep 2, 2024 · 0 comments
Open

[core] JadxRuntimeException in pass: RegionMakerVisitor #2262

pubiqq opened this issue Sep 2, 2024 · 0 comments
Labels
bug Core Issues in jadx-core module

Comments

@pubiqq
Copy link
Contributor

pubiqq commented Sep 2, 2024

Issue details

Regression after cca706c (#2249)

Relevant log output or stacktrace

JADX ERROR: JadxRuntimeException in pass: RegionMakerVisitor
        jadx.core.utils.exceptions.JadxRuntimeException: Failed to find switch 'out' block (already processed)
        	at jadx.core.dex.visitors.regions.RegionMaker.calcSwitchOut(RegionMaker.java:935)
        	at jadx.core.dex.visitors.regions.RegionMaker.processSwitch(RegionMaker.java:798)
        	at jadx.core.dex.visitors.regions.RegionMaker.traverse(RegionMaker.java:157)
        	at jadx.core.dex.visitors.regions.RegionMaker.makeRegion(RegionMaker.java:91)
        	at jadx.core.dex.visitors.regions.RegionMaker.makeEndlessLoop(RegionMaker.java:411)
        	at jadx.core.dex.visitors.regions.RegionMaker.processLoop(RegionMaker.java:201)
        	at jadx.core.dex.visitors.regions.RegionMaker.traverse(RegionMaker.java:135)
        	at jadx.core.dex.visitors.regions.RegionMaker.makeRegion(RegionMaker.java:91)
        	at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:52)

Provide sample and class/method full name

Smali

.method public final setup()V
    .registers 9

    invoke-static {}, Lkotlinx/coroutines/ThreadState;->$jacocoInit()[Z

    move-result-object v0

    .line 102
    iget-object v1, p0, Lkotlinx/coroutines/ThreadState;->job:Lkotlinx/coroutines/Job;

    move-object v2, p0

    check-cast v2, Lkotlin/jvm/functions/Function1;

    const/4 v3, 0x1

    invoke-interface {v1, v3, v3, v2}, Lkotlinx/coroutines/Job;->invokeOnCompletion(ZZLkotlin/jvm/functions/Function1;)Lkotlinx/coroutines/DisposableHandle;

    move-result-object v1

    iput-object v1, p0, Lkotlinx/coroutines/ThreadState;->cancelHandle:Lkotlinx/coroutines/DisposableHandle;

    .line 104
    move-object v1, p0

    .local v1, "$this$loop$iv":Lkotlinx/coroutines/ThreadState;
    const/4 v2, 0x0

    .local v2, "$i$f$loop":I
    const/4 v4, 0x2

    aput-boolean v3, v0, v4

    .line 163
    :goto_15
    nop

    .line 164
    iget v4, v1, Lkotlinx/coroutines/ThreadState;->_state:I

    .local v4, "state":I
    const/4 v5, 0x0

    .line 105
    .local v5, "$i$a$-loop-ThreadState$setup$1":I
    packed-switch v4, :pswitch_data_3e

    .line 110
    :pswitch_1c
    invoke-direct {p0, v4}, Lkotlinx/coroutines/ThreadState;->invalidState(I)Ljava/lang/Void;

    new-instance v6, Lkotlin/KotlinNothingValueException;

    invoke-direct {v6}, Lkotlin/KotlinNothingValueException;-><init>()V

    const/4 v7, 0x5

    aput-boolean v3, v0, v7

    throw v6

    .line 109
    :pswitch_28
    const/4 v6, 0x4

    aput-boolean v3, v0, v6

    return-void

    .line 107
    :pswitch_2c
    sget-object v6, Lkotlinx/coroutines/ThreadState;->_state$FU:Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;

    const/4 v7, 0x0

    invoke-virtual {v6, p0, v4, v7}, Ljava/util/concurrent/atomic/AtomicIntegerFieldUpdater;->compareAndSet(Ljava/lang/Object;II)Z

    move-result v6

    if-eqz v6, :cond_39

    const/4 v6, 0x3

    aput-boolean v3, v0, v6

    return-void

    .line 112
    :cond_39
    nop

    .line 163
    .end local v4    # "state":I
    .end local v5    # "$i$a$-loop-ThreadState$setup$1":I
    const/4 v4, 0x6

    aput-boolean v3, v0, v4

    goto :goto_15

    :pswitch_data_3e
    .packed-switch 0x0
        :pswitch_2c
        :pswitch_1c
        :pswitch_28
        :pswitch_28
    .end packed-switch
.end method

Jadx version

cca706c

@pubiqq pubiqq added bug Core Issues in jadx-core module labels Sep 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Core Issues in jadx-core module
Projects
None yet
Development

No branches or pull requests

1 participant