This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch] Mark the thread_event breakpoint as "not inserted" before calling thread_mourn_inferior


> Definitely not.  We need more information about this bug: what do you
> do to reproduce it, since no one else has encountered it?
> 
I have attached .c to reproduce this bug. I am using gdb-6.4 checked out
from cvs, on Fedora Core 3, 32 bit Athlon processor. To reproduce the
problem just run the application under gdb. No breakpoints, backtrace
etc required. When the application exits this error can be seen.

-Girish.
#include <pthread.h>

#define THR_NUMS 5 
#define MAX_THR 512

void *func(void *num)
{
    int i, j, l, m;

    sleep(1);
    for(i=1;i<10;i++)
      {
	for(j=1;j<10;j++)
	  {
	    l = l+j;	    
	  }
      }
}

int main()
{
    int i, thr_nums;
    pthread_t thr[MAX_THR];

    thr_nums = THR_NUMS;    
    for(i=0;i<thr_nums; i++)
      {
	if ( pthread_create (&(thr[i]), NULL, func, &i ) != 0 )
                            perror("Thread creation failed");
      }

    for (i=0;i<thr_nums;i++)    
      {
	    pthread_join( thr[i], NULL);
      }
    return 0;
}
    
    

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]