Bug 23966 - glibc-2.2-12 breaks pthreads
Summary: glibc-2.2-12 breaks pthreads
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: glibc
Version: 7.0
Hardware: i386
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Aaron Brown
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-13 22:35 UTC by Pete Toscano
Modified: 2016-11-24 15:15 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2001-01-14 09:36:01 UTC
Embargoed:


Attachments (Terms of Use)
conftest.c (1.22 KB, text/plain)
2001-01-13 22:36 UTC, Pete Toscano
no flags Details
including confdefs.h too (1.68 KB, text/plain)
2001-01-13 22:38 UTC, Pete Toscano
no flags Details

Description Pete Toscano 2001-01-13 22:35:50 UTC
openldap-2.0.7's configuration program tests for pthreads.  the test
program that normally succeeds segfaults with glibc-2.2-12.  went back to
2.2-9 and it's working again.  the test program is here (watch the line
wrapping though).  the included file condefs.h can be gotten from the
openldap-2.0.7 package.

pete

#include "confdefs.h"
/* pthread test headers */
#include <pthread.h>
#ifndef NULL
#define NULL (void*)0
#endif

static void *task(p)
        void *p;
{
        return (void *) (p == NULL);
}


int main(argc, argv)
        int argc;
        char **argv;
{

        /* pthread test function */
        pthread_t t;
        int status;
#if HAVE_PTHREADS_FINAL && defined(PTHREAD_CREATE_UNDETACHED)
        /* This system (e.g. AIX) defaults detached; must override */
        pthread_attr_t attr;

        status = pthread_attr_init(&attr);
        if( status ) exit( status );

        status =
pthread_attr_setdetachstate(&attr,PTHREAD_CREATE_UNDETACHED);
        if( status ) exit( status );

#define ATTR    &attr
#else
#if HAVE_PTHREADS_D4
#define ATTR    pthread_attr_default
#else
#define ATTR    NULL
#endif
#endif
        /* make sure pthread_create() isn't just a stub */
        status = pthread_create(&t, ATTR, task, NULL);
        if( status ) exit( status );

        /* make sure pthread_detach() isn't just a stub */
#if HAVE_PTHREADS_D4
        status = pthread_detach( &t );
#else
        status = pthread_detach( t );
#endif

#ifdef HAVE_LINUX_THREADS
        pthread_kill_other_threads_np();
#endif

        exit( status );

}

Comment 1 Pete Toscano 2001-01-13 22:36:54 UTC
Created attachment 7566 [details]
conftest.c

Comment 2 Pete Toscano 2001-01-13 22:38:48 UTC
Created attachment 7567 [details]
including confdefs.h too

Comment 3 Jakub Jelinek 2001-01-14 09:35:58 UTC
I've fixed this yesterday, it made into 2.2.1 final.
It will appear once next rpms are built.

Comment 4 Jakub Jelinek 2001-01-23 10:00:13 UTC
You can grab glibc-2.2.1-2 from rawhide.


Note You need to log in before you can comment on or make changes to this bug.