FreeBSD Bugzilla – Attachment 157202 Details for
Bug 200485
emulators/qemu-user-static: Link with -pthread segfault since r385142
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
test program
conftest.c (text/x-csrc), 3.88 KB, created by
Renato Botelho
on 2015-05-27 18:16:15 UTC
(
hide
)
Description:
test program
Filename:
MIME Type:
Creator:
Renato Botelho
Created:
2015-05-27 18:16:15 UTC
Size:
3.88 KB
patch
obsolete
>/* confdefs.h */ >#define PACKAGE_NAME "" >#define PACKAGE_TARNAME "" >#define PACKAGE_VERSION "" >#define PACKAGE_STRING "" >#define PACKAGE_BUGREPORT "" >#define PACKAGE_URL "" >#define OPENLDAP_PACKAGE "OpenLDAP" >#define OPENLDAP_VERSION "2.4.40" >#define LDAP_VENDOR_VERSION 20440 >#define LDAP_VENDOR_VERSION_MAJOR 2 >#define LDAP_VENDOR_VERSION_MINOR 4 >#define LDAP_VENDOR_VERSION_PATCH 40 >#define HAVE_MKVERSION 1 >#define STDC_HEADERS 1 >#define HAVE_SYS_TYPES_H 1 >#define HAVE_SYS_STAT_H 1 >#define HAVE_STDLIB_H 1 >#define HAVE_STRING_H 1 >#define HAVE_MEMORY_H 1 >#define HAVE_STRINGS_H 1 >#define HAVE_INTTYPES_H 1 >#define HAVE_STDINT_H 1 >#define HAVE_UNISTD_H 1 >#define HAVE_DLFCN_H 1 >#define EXEEXT "" >#define STDC_HEADERS 1 >#define HAVE_DIRENT_H 1 >#define HAVE_SYS_WAIT_H 1 >#define HAVE_ARPA_INET_H 1 >#define HAVE_ARPA_NAMESER_H 1 >#define HAVE_ASSERT_H 1 >#define HAVE_ERRNO_H 1 >#define HAVE_FCNTL_H 1 >#define HAVE_GETOPT_H 1 >#define HAVE_GRP_H 1 >#define HAVE_LIBUTIL_H 1 >#define HAVE_LIMITS_H 1 >#define HAVE_LOCALE_H 1 >#define HAVE_MEMORY_H 1 >#define HAVE_PWD_H 1 >#define HAVE_STDDEF_H 1 >#define HAVE_STRING_H 1 >#define HAVE_STRINGS_H 1 >#define HAVE_SYSEXITS_H 1 >#define HAVE_SYS_FILE_H 1 >#define HAVE_SYS_FILIO_H 1 >#define HAVE_SYS_ERRNO_H 1 >#define HAVE_SYS_IOCTL_H 1 >#define HAVE_SYS_PARAM_H 1 >#define HAVE_SYS_RESOURCE_H 1 >#define HAVE_SYS_SELECT_H 1 >#define HAVE_SYS_SOCKET_H 1 >#define HAVE_SYS_STAT_H 1 >#define HAVE_SYS_SYSLOG_H 1 >#define HAVE_SYS_TIME_H 1 >#define HAVE_SYS_TYPES_H 1 >#define HAVE_SYS_UIO_H 1 >#define HAVE_SYSLOG_H 1 >#define HAVE_TERMIOS_H 1 >#define HAVE_UNISTD_H 1 >#define HAVE_UTIME_H 1 >#define HAVE_RESOLV_H 1 >#define HAVE_NETINET_TCP_H 1 >#define HAVE_SYS_UCRED_H 1 >#define HAVE_SIGACTION 1 >#define HAVE_SIGSET 1 >#define HAVE_SYS_SELECT_H 1 >#define HAVE_SYS_SOCKET_H 1 >#define SELECT_TYPE_ARG1 int >#define SELECT_TYPE_ARG234 (fd_set *) >#define SELECT_TYPE_ARG5 (struct timeval *) >#define HAVE_POLL 1 >#define HAVE_POLL_H 1 >#define HAVE_SYS_POLL_H 1 >#define HAVE_SYS_ERRLIST 1 >#define HAVE_STRERROR 1 >#define HAVE_STRERROR_R 1 >#define HAVE_REGEX_H 1 >#define HAVE_SYS_UUID_H 1 >#define HAVE_RES_QUERY 1 >#define HAVE_HSTRERROR 1 >#define HAVE_GETADDRINFO 1 >#define HAVE_GETNAMEINFO 1 >#define HAVE_GAI_STRERROR 1 >#define HAVE_INET_NTOP 1 >#define HAVE_SYS_UN_H 1 >#define HAVE_OPENSSL_SSL_H 1 >#define HAVE_OPENSSL 1 >#define HAVE_OPENSSL_CRL 1 >#define HAVE_TLS 1 >#define HAVE_PTHREAD_H 1 >#define HAVE_PTHREADS 10 >#define HAVE_SCHED_H 1 >/* end confdefs.h. */ > >/* pthread test headers */ >#include <pthread.h> >#if HAVE_PTHREADS < 7 >#include <errno.h> >#endif >#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 */ >#ifndef PTHREAD_CREATE_DETACHED >#define PTHREAD_CREATE_DETACHED 1 >#endif > pthread_t t; > int status; > int detach = PTHREAD_CREATE_DETACHED; > >#if HAVE_PTHREADS > 4 > /* Final pthreads */ > pthread_attr_t attr; > > status = pthread_attr_init(&attr); > if( status ) return status; > >#if HAVE_PTHREADS < 7 > status = pthread_attr_setdetachstate(&attr, &detach); > if( status < 0 ) status = errno; >#else > status = pthread_attr_setdetachstate(&attr, detach); >#endif > if( status ) return status; > status = pthread_create( &t, &attr, task, NULL ); >#if HAVE_PTHREADS < 7 > if( status < 0 ) status = errno; >#endif > if( status ) return status; >#else > /* Draft 4 pthreads */ > status = pthread_create( &t, pthread_attr_default, task, NULL ); > if( status ) return errno; > > /* give thread a chance to complete */ > /* it should remain joinable and hence detachable */ > sleep( 1 ); > > status = pthread_detach( &t ); > if( status ) return errno; >#endif > >#ifdef HAVE_LINUX_THREADS > pthread_kill_other_threads_np(); >#endif > > return 0; > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 200485
: 157202