> For shits and giggles I deceided to look into pthread_spin_unlock and > saw that we return EPERM here, while POSIX states that this behaviour > is unconditionally undefined.[0] Is there a reason why we shouldn't > abort here as well?
Undefined doesn't mean it can turn into a bowl of petunias. As a general rule, it is completely terrible if base libraries abort, it is terrible if programs dump core in a directory for an inexplicit reason which is hard to diagnose from the corefile. And have you read abort.c? It does and performs multiple system calls before actually dying..
