Tagged articles
2 articles
Page 1 of 1
Sohu Tech Products
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.

AssemblyHookingObjective‑C
0 likes · 12 min read
Understanding Variadic Function Hooking and Stack Context Pollution with TrampolineHook
Tencent TDS Service
Tencent TDS Service
Dec 6, 2018 · Mobile Development

Why IMP Calls Crash on ARM64 iOS: Uncovering Variadic ABI Pitfalls

This article investigates a crash caused by calling IMP pointers on ARM64 iOS devices, explains how variadic function argument passing differs from the standard ABI, demonstrates the issue with test code and assembly analysis, and provides a solution by explicitly casting IMP to the correct function type.

ARM64IMPObjective‑C
0 likes · 16 min read
Why IMP Calls Crash on ARM64 iOS: Uncovering Variadic ABI Pitfalls