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

[kotlin] StackOverflowError When Encountering Clashing Names #453

Open
solonovamax opened this issue Jan 13, 2025 · 1 comment
Open

[kotlin] StackOverflowError When Encountering Clashing Names #453

solonovamax opened this issue Jan 13, 2025 · 1 comment

Comments

@solonovamax
Copy link

Vineflower version

I'm using a build of the latest commit to the develop branch (317e74b).

Describe the bug

When attempting to decompile some kotlin code which has conflicting names (at least this is what I'm guessing the issue is from the stack trace), a StackOverflow will occur.

Additional information

Download a tarball of the following things:

  • RoutesKt.class
  • RoutesKt$configureRoutes$1$1$1.class (nice naming, kotlin)
  • Routes.kt
  • the full log emitted by vineflower (vineflower.log)
  • fernflower, quiltflower, and vineflower folders containing the decompiled code that they each emit

Notes:

  • the project I am working in was using ktor, so to compile that class file you'd need to add that as a dependency.
    • currently the project is private, however it will eventually™ be open sourced. when I do make it open source, I can provide a link to the project. however the project will be released under the AGPL.
  • fernflower and quiltflower can successfully decompile the class (both executed with [tool] Routes*.class [tool]/ where [tool] is either fernflower or quiltflower)
  • the sample provided is a minimal sample and afaik cannot be reduced further
  • I am hereby releasing the code (& binaries) in the tarball under the following licenses. Choose whichever one you want.
    • Public Domain (ik whether or not smth can be released to the public domain depends on jurisdiction, which is why I've also provided the other licenses
    • CC0
    • The Unlicense

Here is what is logged when decompiling it (some things omitted for brevity. see the attached tarball for a full log):

INFO:  Loaded 3 plugins
INFO:  JVM info: Eclipse Adoptium - 21.0.5 - 21.0.5+11-LTS
INFO:  Scanning classes from Java runtime current
INFO:  Scanning classes from module [email protected]
[several "scanning classes from module ..." omitted]
INFO:  Scanning classes from file RoutesKt$configureRoutes$1$1$1.class
INFO:  Loading Class: gay/solonovamax/syrup/routes/RoutesKt$configureRoutes$1$1$1 from file RoutesKt$configureRoutes$1$1$1.class
INFO:  Scanning classes from file RoutesKt.class
INFO:  Loading Class: gay/solonovamax/syrup/routes/RoutesKt from file RoutesKt.class
INFO:  Preprocessing class gay/solonovamax/syrup/routes/RoutesKt
INFO:     Loading Class: java/lang/Object from module [email protected]
INFO:  ... done
INFO:  Decompiling class gay/solonovamax/syrup/routes/RoutesKt
WARN:        Class null couldn't be written.
java.lang.StackOverflowError
	at org.jetbrains.java.decompiler.modules.decompiler.vars.VarDefinitionHelper.iterateClashingExprent(VarDefinitionHelper.java:1694)
	at org.jetbrains.java.decompiler.modules.decompiler.vars.VarDefinitionHelper.iterateClashingNames(VarDefinitionHelper.java:1492)
	at org.jetbrains.java.decompiler.modules.decompiler.vars.VarDefinitionHelper.iterateClashingNames(VarDefinitionHelper.java:1541)
	at org.jetbrains.java.decompiler.modules.decompiler.vars.VarDefinitionHelper.iterateClashingNames(VarDefinitionHelper.java:1541)
	at org.jetbrains.java.decompiler.modules.decompiler.vars.VarDefinitionHelper.iterateClashingNames(VarDefinitionHelper.java:1541)
	at org.jetbrains.java.decompiler.modules.decompiler.vars.VarDefinitionHelper.iterateClashingExprent(VarDefinitionHelper.java:1672)
	at org.jetbrains.java.decompiler.modules.decompiler.vars.VarDefinitionHelper.iterateClashingNames(VarDefinitionHelper.java:1492)
[last 3 lines repeated many times]
INFO:  ... done
@solonovamax
Copy link
Author

Actually, this is likely related to #424.
Should I close this issue and move over to there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant