Skip to content

chore: remove broken JIT anti-tamper mode - #110

Merged
mcpolo99 merged 1 commit into
developfrom
chore/remove-broken-jit-antitamper
Sep 21, 2026
Merged

mcpolo99 merged 1 commit into
developfrom
chore/remove-broken-jit-antitamper

Conversation

@mcpolo99

Copy link
Copy Markdown
Owner

Remove the dead JIT anti-tamper mode

Housekeeping: the JIT anti-tamper mode is non-functional and has been for years, so it's carried purely as dead weight.

Why remove it

Rather than randomize its remaining fingerprint constants on a path that produces no working output, drop it.

Changes

  • Delete JITMode.cs, JITBody.cs (obfuscator) and AntiTamper.JIT.cs (runtime) — ~1,150 lines.
  • Remove the Mode.JIT enum value + its dispatch case (default stays, normal remains the default).
  • Remove the skipped jit test case — AntiTamper.Test now runs normal + anti with no skips.
  • Correct docs/protections.md, which still described a stale jit/native mode set; the real modes are normal and anti.

Behavior note

A config that still specifies mode=jit now fails loudly at parse time (Enum.Parse) instead of silently producing broken output — strictly better, since JIT never worked.

Validation

  • Confuser.Runtime + Confuser.Protections build clean (0 warnings).
  • AntiTamper.Test — 2 passed, 0 skipped (normal + anti).

Related: #69 (JIT constants descoped), #22 (JIT non-functional).

The JIT anti-tamper mode has been non-functional since 2018: its test is
skipped ("Runtime Component of the JIT AntiTamper protection is broken")
and #22 documented that it does not actually hide method bodies. It has
0% coverage, is not the default (normal is), and the JIT-hook technique it
relies on is out of scope for the identity work in #69. Rather than carry
dead code (and randomize constants on a path that produces no working
output), remove it.

Removed:
- Confuser.Protections/AntiTamper/JITMode.cs, JITBody.cs
- Confuser.Runtime/AntiTamper.JIT.cs
- the Mode.JIT enum value and its dispatch case (default stays normal)
- the skipped jit test case (AntiTamper.Test now runs normal + anti, no skip)

Also corrects the anti-tamper docs, which still described a stale
jit/native mode set; the real modes are normal and anti.

A config that still specifies mode=jit now fails loudly at parse time
instead of silently producing broken output.
@mcpolo99
mcpolo99 merged commit 2c025f1 into develop Sep 21, 2026
3 checks passed
@mcpolo99
mcpolo99 deleted the chore/remove-broken-jit-antitamper branch September 29, 2026 19:19
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

Successfully merging this pull request may close these issues.

1 participant