popcorn-compiler
popcorn-compiler copied to clipboard
Changing musl Makefile to use -O0 explicitly causes arm64 STLXR -> LDAXR pair to fail on real machines
In case anyone makes this mistake like I did. This will cause atomic arm64 instructions STLXR and LDAXR in a_fetch_and() or a_fetch_or() musl functions to fail and get stuck in an infinite loop. These are called in malloc().
https://github.com/ssrg-vt/popcorn-compiler/blob/b0091310bb709e785013621b4d21af2c098d210c/lib/musl-1.1.18/Makefile#L121