From: Rich Felker Date: Sun, 11 Sep 2011 16:35:41 +0000 (-0400) Subject: fix serious bug in pthread_join X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=commitdiff_plain;h=8fe5fa56eeade4fc19c5401861c179c2fdfeaf3d;hp=8fe5fa56eeade4fc19c5401861c179c2fdfeaf3d fix serious bug in pthread_join on spurious wakeups/returns from __timedwait, pthread_join would "succeed" and unmap the thread's stack while it was still running. at best this would lead to SIGSEGV when the thread resumed execution, but in the worst case, the thread would later resume executing on top of another new thread's stack mapped at the same address. spent about 4 hours tracking this bug down, chasing rare difficult-to-reproduce stack corruption in a stress test program. still no idea *what* caused the spurious wakeups; i suspect it's a kernel bug. ---