FreeBSD Bugzilla – Attachment 152607 Details for
Bug 197365
pthread_barrier_destroy() return EBUSY on idle barrier
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
reproduce test case
freebsd10_pthread_barrier_destroy_issue.c (text/plain), 613 bytes, created by
Florent Guiliani
on 2015-02-06 11:37:40 UTC
(
hide
)
Description:
reproduce test case
Filename:
MIME Type:
Creator:
Florent Guiliani
Created:
2015-02-06 11:37:40 UTC
Size:
613 bytes
patch
obsolete
>#include <assert.h> >#include <pthread.h> >#include <stdio.h> >#include <stdlib.h> >#include <string.h> > >int main(int argc, char ** argv) { > > pthread_barrier_t barrier; > > int rc; > > for (int i = 0; i < 10000; i++) { > void * garbage = malloc(i); > memset(garbage, 0xFF, i); > free(garbage); > } > > rc = pthread_barrier_init(&barrier, NULL, 2); > assert(rc == 0); > > rc = pthread_barrier_destroy(&barrier); > if (rc != 0) { > printf("pthread_barrier_destroy failed: rc=%d, error=%s\n", > rc, > strerror(rc)); > return 1; > } > > 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 197365
: 152607