Subject: port-alpha/18948: glib2 threads break on alpha
To: None <gnats-bugs@gnats.netbsd.org>
From: None <tnn@netilium.org>
List: netbsd-bugs
Date: 11/05/2002 15:22:17
>Number:         18948
>Category:       port-alpha
>Synopsis:       glib2 threads break on alpha
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-alpha-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Nov 05 15:23:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Tobias Nygren
>Release:        1.6_STABLE
>Organization:
>Environment:
>Description:
GThreads don't work with glib2 on alpha.
See attached source code.
>How-To-Repeat:
#include <glib.h>
#include <stdio.h>

/* 
   glib2test.c 
   Works on i386, breaks on alpha

   Used:

   NetBSD 1.6-STABLE
   glib2-2.0.6nb2
   pth-1.4.1nb5

   compile:
   
   gcc -I /usr/pkg/include/glib/glib-2.0 \
   -I /usr/pkg/lib/glib-2.0/include \
   -L/usr/pkg/lib -Wl,-R/usr/pkg/lib \
   -lglib-2.0 -lgthread-2.0 \
   glib2test.c -o glib2test

*/

gpointer mythread(gpointer data) {
  /* this never happens */
  printf("The thread is running\n");
}

int main(int argc, char **argv) {
  g_thread_init(NULL);
  g_thread_create(&mythread, NULL, FALSE, NULL);
  for(;;) {
    getchar();
  }
}
>Fix:

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