popcorn-compiler
popcorn-compiler copied to clipboard
TLS alignment lead to a not aligned stack on aarch64
When using TLS, the size of the section may lead to having a not aligned stack on aarch64: the TLS is allocated at the same time as the stack within pthread_create().
This problem is confirmed by the kernel dmesg message: "SP Alignment exception: pc=0000000000508d10 sp=00007ffff6b2a9a8"
A test that show the problem is in the "popcorn-test" repos in the "tls-test" test.
Two possible solutions:
- Align the TLS section in the LDSCRIPT
- Modify the musl library to make sure that the stack is aligned
@mohamed-karaoui is this issue now closed?
Not sure. I will run the test again on the last master branch, just in case.