https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82109
Martin Liška <marxin at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2018-11-23 Ever confirmed|0 |1 --- Comment #1 from Martin Liška <marxin at gcc dot gnu.org> --- Confirmed, note that when a cleanup_routine is executed, it has following back-trace: (gdb) bt #0 cleanup_routine (arg=0x0) at asan_pthread_cancel.c:9 #1 0x00000000004014ed in start_routine (arg=0x7fffffffdae0) at asan_pthread_cancel.c:24 #2 0x00007ffff6df7554 in start_thread (arg=<optimized out>) at pthread_create.c:463 #3 0x00007ffff6b2accf in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:95 So it's a longjmp probably. The test-case is very trick, probably not fixable easy. Note that you should not do a fancy stuff in a pthread cleanup function.