LLVM

Learn Relocation by Debugging a HWASAN Linker Error

笔者在 Linux/AArch64 环境下使用 HWASAN 时,遇到一 “relocation R_AARCH64_ADR_PREL_PG_HI21 out of range” 链接错误,在分析解决该链接错误过程中对 linker relocation 以及 HWASAN 都有了更深的理解,因此将分析解决该链接错误的过程梳理总结形成此文。

Strict Aliasing, TBAA and TypeSanitizer

本文首先介绍了 C++ 中的 strict aliasing rule,然后深入分析编译器是如何利用 strict aliasing rule 对程序进行分析优化的,之后介绍了检测 strict aliasing violation 的动态分析工具 TypeSanitizer,最后介绍如何在编程时避免写出 strict aliasing violation 的代码。