popcorn-compiler icon indicating copy to clipboard operation
popcorn-compiler copied to clipboard

Changing musl Makefile to use -O0 explicitly causes arm64 STLXR -> LDAXR pair to fail on real machines

Open Sengming opened this issue 5 years ago • 0 comments

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

Sengming avatar Jul 24 '19 20:07 Sengming