This is the mail archive of the gdb-prs@sources.redhat.com 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]

threads/1057: pthread_create locks up GDB on IRIX platform


>Number:         1057
>Category:       threads
>Synopsis:       pthread_create locks up GDB on IRIX platform
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 12 23:08:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     funk@hiwaay.net
>Release:        gdb-5.3
>Organization:
>Environment:
uname -a = IRIX64 MYMACHINE 6.5 07201611 IP27
Two 350 MHz processors
g++ v3.2
>Description:
When executings pthread_create, the gdb debugger locks up.  Below is an example program (snatched off the web) that replicates this behavior:

#include <stdio.h>
#include <pthread.h>

void* function(void*p) {
  while(1) {
     printf("function %i\n",(int)p);
  }
  return 0;
}

int main(int argc, char *argv[]) {
  pthread_t threadID;
  for (int i=0; i<5; i++) {
    pthread_create(&threadID, NULL, function, (void*)i);
  }
  return 0;
}
>How-To-Repeat:
Compile as follows:
g++ test.cpp -lpthread -o test

Execute "gdb test" and "run"

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


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