FreeBSD Bugzilla – Attachment 209102 Details for
Bug 241905
SSP setup is not thread-safe ?
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
minimal reproducer-ish
repro.c (text/plain), 656 bytes, created by
Kyle Evans
on 2019-11-12 14:35:16 UTC
(
hide
)
Description:
minimal reproducer-ish
Filename:
MIME Type:
Creator:
Kyle Evans
Created:
2019-11-12 14:35:16 UTC
Size:
656 bytes
patch
obsolete
>#include <stdlib.h> >#include <unistd.h> > >#include <pthread.h> > >#define THREAD_COUNT 16 > >static void __attribute__((noinline)) >ssp_canary_killer(void) >{ > >} > >static void * >condef_thread(void *data __unused) >{ > int i; > > i = 0; > for (;;) > ssp_canary_killer(); > return (NULL); >} > >static void __attribute__((__constructor__)) >condef() >{ > pthread_t thr[THREAD_COUNT]; > pthread_attr_t attr; > int thrc; > > pthread_attr_init(&attr); > pthread_attr_setdetachstate(&attr, 1); > > for (thrc = 0; thrc < THREAD_COUNT; ++thrc) { > pthread_create(&thr[thrc], &attr, condef_thread, NULL); > } > > pthread_yield(); >} > >int >main(int argc, char *argv[]) >{ > > sleep(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 241905
: 209102