Go Assembly Bugs: Frame Pointer Clashes in Two Cases
2025-01-04
This post dissects two Go crashes stemming from buggy assembly code that clobbered the frame pointer. One bug overwritten the frame pointer register (BP on AMD64) within the go-metro library, the other incorrectly saved the frame pointer on the stack in Apache Arrow's ARM64 assembly. The author recommends using assembly generators like Avo to avoid manual register and stack manipulation. The article delves into ABIs and calling conventions, offering insights into preventing similar issues, highlighting the importance of understanding and adhering to Go's assembly guidelines.
Read more