chore: remove broken JIT anti-tamper mode - #110
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
normalis), so removal doesn't change default behavior.Rather than randomize its remaining fingerprint constants on a path that produces no working output, drop it.
Changes
JITMode.cs,JITBody.cs(obfuscator) andAntiTamper.JIT.cs(runtime) — ~1,150 lines.Mode.JITenum value + its dispatch case (defaultstays,normalremains the default).jittest case —AntiTamper.Testnow runsnormal+antiwith no skips.docs/protections.md, which still described a stalejit/nativemode set; the real modes arenormalandanti.Behavior note
A config that still specifies
mode=jitnow fails loudly at parse time (Enum.Parse) instead of silently producing broken output — strictly better, since JIT never worked.Validation
Confuser.Runtime+Confuser.Protectionsbuild clean (0 warnings).AntiTamper.Test— 2 passed, 0 skipped (normal + anti).Related: #69 (JIT constants descoped), #22 (JIT non-functional).