[Bug sanitizer/82109] False positive when using pthread_cleanup_push() and pthread_cancel()
marxin at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Fri Nov 23 12:36:00 GMT 2018
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.
More information about the Gcc-bugs
mailing list