MDEV-35574 remove obsolete pthread_exit calls

Threads can normally exit without a explicit pthread_exit call.

There seem to date to old glibc bugs, many around 2.2.5.

The semi related bug was https://bugs.mysql.com/bug.php?id=82886.

To improve safety in the signal handlers DBUG_* code was removed.

These where also needed to avoid some MSAN unresolved stack issues.

This is effectively a backport of 2719cc4925.
This commit is contained in:
Daniel Black 2024-12-05 15:31:40 +11:00
commit bf7cfa2535
10 changed files with 4 additions and 22 deletions

View file

@ -271,12 +271,7 @@ error_exit_in_thread(intptr_t code)
CRITICAL_SECTION_ENTER(grntest_cs);
grntest_stop_flag = 1;
CRITICAL_SECTION_LEAVE(grntest_cs);
#ifdef WIN32
_endthreadex(code);
#else
pthread_exit((void *)code);
#endif /* WIN32 */
return 0;
return code;
}