Konloch / Konloch/bytecode-viewer

fernflower doesn't preserve local var/parameter names always

Open
#392 0 comments 0 reactions 0 assignees View on GitHub
Dependency Related
Dominant language
Java
Stars
15.6k
Forks
1.3k
PR merge metrics
No merged PRs in 30d

Description

java version: 1.8.0_321
version: Bytecode-Viewer-2.11.0

Issue: it will say var0 instead of saying meta as a local variable. I noticed this also occurs with parameter naming

steps to reprocude:
1. download the minecraft.jar https://launcher.mojang.com/v1/objects/7b07fd09d1e3aae1bc7a1304fedc73bfe5d81800/client.jar
2. download the mapping file https://launcher.mojang.com/v1/objects/a0bea08f0b96f6f30a350cd75270be63f7d0aac4/client.txt
3. deob with recaf https://github.com/Col-E/Recaf and make sure to select proguard mappings
4. export jar with recaf name it 1.15-deob.jar
5. open jar with bytecode viewer
6. decompile all classes using fernflower
7. net/minecraft/world/item/ArrowItem.java notice the local var name is obfuscated while doing the same steps with cfr will result in a deob name

possible issues: did I try it using java 17 no? was an error thrown no. I also launched using start java -jar command and no visible errors.

Contributor guide

Open the contributing guide

Research direction

Reproduce the report with minecraft.jar, client.txt, Recaf, and Bytecode Viewer 2.11.0 by decompiling net/minecraft/world/item/ArrowItem.java with Fernflower. Compare its local and parameter names with CFR's output, and check whether Java 8 versus Java 17 changes the result. Done means Fernflower preserves the deobfuscated names instead of emitting names such as var0.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
reverse-engineering
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.