RandomAccessFile variable incorrectly split in SignLink class #96

Open
opened 4 years ago by gpe · 6 comments
gpe commented 4 years ago
Owner

The problematic method is the one for finding the cache (search for ".openrs2_cache_").

The problematic method is the one for finding the cache (search for `".openrs2_cache_"`).
gpe added the
bug
deobfuscator
labels 4 years ago
Poster
Owner

Actually, it might not be a try/finally block. However, the variable scoping is wrong.

Actually, it might not be a try/finally block. However, the variable scoping is wrong.
Poster
Owner

Seems to be caused by us commenting out simpleMerge() in Fernflower.

Seems to be caused by us commenting out simpleMerge() in Fernflower.
Poster
Owner

I wonder if the variable merging covers up a bug in Fernflower's SSA implementation?

I wonder if the variable merging covers up a bug in Fernflower's SSA implementation?
gpe changed title from try/finally block in the (SD) signlink decompiled incorrectly to RandomAccessFile variable incorrectly split in SignLink class 4 years ago
Poster
Owner

Similarly, the opcode variable is incorrectly split in the ScriptRunner class:

		@Pc(25) byte local25 = -1;
		try {
			@Pc(27) int instructions = 0;
			label4473:
			while (true) {
				instructions++;
				if (instructions > maxInstructions) {
					throw new RuntimeException("slow");
				}
				pc++;
				@Pc(45) int opcode = opcodes[pc];

local25 should be opcode here.

Similarly, the opcode variable is incorrectly split in the `ScriptRunner` class: ``` @Pc(25) byte local25 = -1; try { @Pc(27) int instructions = 0; label4473: while (true) { instructions++; if (instructions > maxInstructions) { throw new RuntimeException("slow"); } pc++; @Pc(45) int opcode = opcodes[pc]; ``` `local25` should be `opcode` here.

Similarly, the opcode variable is incorrectly split in the ScriptRunner class:

		@Pc(25) byte local25 = -1;
		try {
			@Pc(27) int instructions = 0;
			label4473:
			while (true) {
				instructions++;
				if (instructions > maxInstructions) {
					throw new RuntimeException("slow");
				}
				pc++;
				@Pc(45) int opcode = opcodes[pc];

local25 should be opcode here.

Is the renaming being automated?

> Similarly, the opcode variable is incorrectly split in the `ScriptRunner` class: > > ``` > @Pc(25) byte local25 = -1; > try { > @Pc(27) int instructions = 0; > label4473: > while (true) { > instructions++; > if (instructions > maxInstructions) { > throw new RuntimeException("slow"); > } > pc++; > @Pc(45) int opcode = opcodes[pc]; > ``` > > `local25` should be `opcode` here. Is the renaming being automated?
Poster
Owner

The bug is in Fernflower's SSA implementation (though I've no clue what it is yet), it isn't related to naming.

The bug is in Fernflower's SSA implementation (though I've no clue what it is yet), it isn't related to naming.
Sign in to join this conversation.
Loading…
There is no content yet.