Commit Graph
2 Commits
Author SHA1 Message Date
Shirona1337andClaude Opus 4.8 f59d4c121c fix(patchify): guard HEAD inject arity and correct Embeddium patch docs
Follow-up hardening for the Embeddium/Sodium XRay compat patch (#54).

- PatchTransformer.injectHead now validates a handler's parameter list
  against the forwarded (receiver, args..., CallbackInfo) sequence before
  emitting bytecode. Name-only (desc="") patches match by method name
  alone, so a handler could bind to a target with a different arity or
  primitive parameter types and produce a VerifyError at class load. Such
  mismatches are now logged and skipped instead.
- Name-only matching in apply() now resolves the target method name via
  getHandlerTargetMethodName(), covering all handler kinds instead of only
  Inject/Overwrite.
- BlockOcclusionCachePatch javadoc: drop the stale claim that registration
  is guarded by Class.forName() (it is registered unconditionally, and must
  be), and clarify that Object params only protect against type mismatches,
  not arity mismatches.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-20 00:46:40 +08:00
Kajiki 21508a6f34 fix: 修复在sodium(或sodium based)的视觉优化模组加载时xray不工作 2026-06-19 22:45:56 +08:00