Strictly speaking, this an API contract violation. However, since use-after-free as often referred to in that manner*, I don't think this is much of a stretch either. In other words, I'm just being slightly lazy. This doesn't make the issue any less real.
* From OpenBSD man pages, https://man.openbsd.org/free.3:
Like i said in my edit, after reading the notes section of pthread_join it's pretty clear that the problem is the programmer of the crashing application ignoring the documentation. Undefined behavior is something you don't invoke unless you know some way to make it defined or have a very serious reason to rely on it. He/she/it didn't and it blew up.
The comparison is fine. Actually i would have brought up free myself if you wouldn't have beat me to it. It's just that those kind of problems are very much unavoidable unless you take memory management out of the programmers hands (i think that's what rust does?) or have some more or less clever logic to check the validity of the requested operation. All of that comes with it's own set of drawbacks that depending on the situation might or might not be acceptable.
It's also not even that taking memory management out of the equation would fully eliminate such problems. An api can only reasonably have safety nets for so much usage that does not make any practical sense before it becomes bloated and slow just to safe the world from people who ignore documentation. It's kinda like expecting a second call to strtok to return the same string again even if the documentation says you get the next one just because when you tried your string happened to contain the same token in a row two times.
Who cares about me? I don't even have source code access for that shit. (Which technically makes all behavior well defined, since everything is already compiled.)
I am sorry, the "you" in that sentence was meant in a general sense. It was not my intention to refer to you personally. I just wanted to say that if one is writing C it has to accepted that unchecked memory management is part of the package. Sometimes that will be advantageous. Sometimes it will be a waste of time and an unneeded possibility for errors.