FreeBSD Bugzilla – Attachment 242275 Details for
Bug 271490
Deadlock between _rtld_atfork_pre and _thr_attr_init
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Isolated reproduction of the issue
reproduction.c (text/plain), 665 bytes, created by
KJ Tsanaktsidis
on 2023-05-19 11:52:13 UTC
(
hide
)
Description:
Isolated reproduction of the issue
Filename:
MIME Type:
Creator:
KJ Tsanaktsidis
Created:
2023-05-19 11:52:13 UTC
Size:
665 bytes
patch
obsolete
>#include <stdlib.h> >#include <unistd.h> >#include <pthread.h> >#include <stdio.h> >#include <sys/wait.h> >#include <string.h> > >void *the_thread(void *ctx) { > /* Call a selection of async-signal-safe functions */ > (void)pthread_self(); > (void)strlen("foo"); > struct timespec tm; > tm.tv_sec = 0; > tm.tv_nsec = 1; > nanosleep(&tm, NULL); > return NULL; >} > >int main(int argc, char **argv) { > printf("starting\n"); > pthread_t th1, th2; > pthread_create(&th1, NULL, the_thread, NULL); > pid_t pid = fork(); > if (pid > 0) { > waitpid(pid, NULL, 0); > exit(0); > } > pthread_create(&th2, NULL, the_thread, NULL); > daemon(1, 1); > printf("ending\n"); > exit(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 271490
:
242250
|
242274
| 242275