question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hierarchy method renaming fails on classes with outdated opcodes JSR/RET

See original GitHub issue

When remapping methods on small inputs, the method hierarchy is renamed successfully. When introducing a thousand or so extra/unrelated classes renaming the same method fails to update the hierarchy

Linked method renaming feature success is conditional

To Reproduce Steps to reproduce the behavior:

  1. Compile recaf from src and then use the smaller jar as input.
  2. Use Linked method renaming and rename me/coley/logging/Logger.write(Ljava/lang/String;)V to anything
    • It should rename, and so should me/coley/logging/ConsoleLogger.write(Ljava/lang/String;)V
  3. Use the larger jar with dependencies as input.
  4. Use Linked method renaming and rename me/coley/logging/Logger.write(Ljava/lang/String;)V to anything
    • It does not rename, and nor does me/coley/logging/ConsoleLogger.write(Ljava/lang/String;)V

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
andrewleechcommented, Feb 19, 2021

Thanks for the suggestion, I’ve just started trying out recaf and so far love the work you’ve put into it!

1reaction
Col-Ecommented, Jun 19, 2018

So the actual issue was there were certain classes in the jar that were compiled with an older version and hence contained older opcodes that are no longer supported. Recaf tried to generate stack-frames for the opcode which failed due to ASM’s implementation.

Possible future approaches:

  • Plugin to replace JSR/RET opcodes so this does not happen
  • Auto-detect when to not use COMPUTE_FRAMES even when the option is enabled
Read more comments on GitHub >

github_iconTop Results From Across the Web

jdk/jdk: c90ca650da3f
files, src/java.base/share/classes/jdk/internal/org/objectweb/asm/ ... This method will be renamed when it becomes stable, this + * will break existing code ...
Read more >
bfd/doc/bfd.info - native_client/nacl-binutils - Git at Google
The easiest way to report a BFD error to the user is to use. `bfd_perror'. ... `BFD' has an instance of this class...
Read more >
Making Software More Reliable by Uncovering Hidden ...
ticed, tests can unexpectedly fail when executed out of order, causing unreliable ... 4.7 Key API methods, classes and interfaces exposed by PHOSPHOR...
Read more >
Index ([net.sf.proguard] proguard-base 6.2.0 API) - javadoc.io
This ClassVisitor renames the class names and class member names of the classes ... Log a failed call to one of the constructor...
Read more >
Static Single Assignment for Decompilation
pointer thus moves down the class hierarchy. The reciprocal process is called upcasting. In some cases, downcasting or upcasting will result in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found