diff options
author | Yabin Cui <yabinc@google.com> | 2014-12-18 14:22:09 -0800 |
---|---|---|
committer | Yabin Cui <yabinc@google.com> | 2015-01-15 10:45:25 -0800 |
commit | 19e246dda6772ffc532b1762cd7870d6c3b01c12 (patch) | |
tree | 93ab36fe44bc75b7366ad6d362ba25bc4ba4d994 /libc/stdio/stdio_ext.cpp | |
parent | deab11acd7000573ad9c034e5bf9475aadbc5cbe (diff) |
Fix possible leak in pthread_detach.
If pthread_detach() is called while the thread is in pthread_exit(),
it takes the risk that no one can free the pthread_internal_t.
So I add PTHREAD_ATTR_FLAG_ZOMBIE to detect this, maybe very rare, but
both glibc and netbsd libpthread have similar function.
Change-Id: Iaa15f651903b8ca07aaa7bd4de46ff14a2f93835
Diffstat (limited to 'libc/stdio/stdio_ext.cpp')
0 files changed, 0 insertions, 0 deletions