Sohu Tech Products
Jun 3, 2020 · Mobile Development
Understanding Variadic Function Hooking and Stack Context Pollution with TrampolineHook
This article explains why adding parameter‑reading code to a variadic‑function hook causes a deterministic crash due to stack context pollution, analyzes the calling‑stack layout and register usage with ARM64 assembly, and presents a heap‑based context‑saving solution using TrampolineHook to safely intercept variadic methods on iOS.
HookingObjective-CTrampolineHook
0 likes · 12 min read