Elliott Hughes 4f251bee5d Don't corrupt the thread list if the main thread exits.
...and don't pass a non-heap pointer to free(3), either.

This patch replaces the "node** prev" with the clearer "node* prev"
style and fixes the null pointer dereference in the old code. That's
not sufficient to fix the reporter's bug, though. The pthread_internal_t*
for the main thread isn't heap-allocated --- __libc_init_tls causes a
pointer to a statically-allocated pthread_internal_t to be added to
the thread list.

Bug: http://code.google.com/p/android/issues/detail?id=37410
Change-Id: I112b7f22782fc789d58f9c783f7b323bda8fb8b7
2012-11-01 17:27:07 -07:00
..
2012-10-23 16:05:09 -07:00
2011-12-06 08:39:18 -08:00
2012-08-20 14:12:20 -07:00
2010-01-15 15:57:02 -08:00
2012-10-23 16:05:09 -07:00
2012-06-08 12:14:48 -07:00
2012-10-11 16:08:51 -07:00
2012-10-11 16:08:51 -07:00
2012-10-11 16:08:51 -07:00
2009-03-03 19:28:35 -08:00
2011-03-21 20:01:03 -07:00
2011-07-07 22:46:16 +02:00
2012-10-16 17:58:17 -07:00
2012-10-16 17:58:17 -07:00
2012-10-22 16:04:56 -07:00
2010-10-15 02:16:16 +08:00
2012-09-26 14:20:22 -07:00