disappearance. This fixes an assertion failure to do with thread nukage
on fork():
vg_scheduler.c:936 (poll_for_ready_fds):
Assertion `vgPlain_is_valid_tid(tid)' failed.
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@478
static
void cleanup_after_thread_exited ( ThreadId tid )
{
+ Int i;
vki_ksigset_t irrelevant_sigmask;
vg_assert(VG_(is_valid_or_empty_tid)(tid));
vg_assert(VG_(threads)[tid].status == VgTs_Empty);
this thread. */
VG_(block_all_host_signals)( &irrelevant_sigmask );
VG_(handle_SCSS_change)( False /* lazy update */ );
+
+ /* Clean up the waiting_fd table */
+ for (i = 0; i < VG_N_WAITING_FDS; i++) {
+ if (vg_waiting_fds[i].tid == tid) {
+ vg_waiting_fds[i].fd = -1; /* not in use */
+ }
+ }
}
static
void cleanup_after_thread_exited ( ThreadId tid )
{
+ Int i;
vki_ksigset_t irrelevant_sigmask;
vg_assert(VG_(is_valid_or_empty_tid)(tid));
vg_assert(VG_(threads)[tid].status == VgTs_Empty);
this thread. */
VG_(block_all_host_signals)( &irrelevant_sigmask );
VG_(handle_SCSS_change)( False /* lazy update */ );
+
+ /* Clean up the waiting_fd table */
+ for (i = 0; i < VG_N_WAITING_FDS; i++) {
+ if (vg_waiting_fds[i].tid == tid) {
+ vg_waiting_fds[i].fd = -1; /* not in use */
+ }
+ }
}