FreeBSD Bugzilla – Attachment 207731 Details for
Bug 240761
graphics/mesa-dri: Segmentation fault occurs while executing atexit handlers (affects lang/clover: Segmentation fault in OpenCL programs)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
Constructor/destructor workaround
patch-src_util_u__queue.c (text/plain), 882 bytes, created by
shamaz.mazum
on 2019-09-23 07:26:26 UTC
(
hide
)
Description:
Constructor/destructor workaround
Filename:
MIME Type:
Creator:
shamaz.mazum
Created:
2019-09-23 07:26:26 UTC
Size:
882 bytes
patch
obsolete
>--- src/util/u_queue.c.orig 2017-11-03 19:47:07.681178000 +0300 >+++ src/util/u_queue.c 2017-11-03 19:48:33.241932000 +0300 >@@ -36,12 +36,17 @@ > * are using the static variables. > */ > >-static once_flag atexit_once_flag = ONCE_FLAG_INIT; > static struct list_head queue_list; > static mtx_t exit_mutex = _MTX_INITIALIZER_NP; > >-static void >-atexit_handler(void) >+__attribute__((constructor)) >+static void initfn(void) >+{ >+ LIST_INITHEAD(&queue_list); >+} >+ >+__attribute__((destructor)) >+static void destructfn(void) > { > struct util_queue *iter; > >@@ -54,17 +59,8 @@ > } > > static void >-global_init(void) >-{ >- LIST_INITHEAD(&queue_list); >- atexit(atexit_handler); >-} >- >-static void > add_to_atexit_list(struct util_queue *queue) > { >- call_once(&atexit_once_flag, global_init); >- > mtx_lock(&exit_mutex); > LIST_ADD(&queue->head, &queue_list); > mtx_unlock(&exit_mutex);
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 240761
: 207731 |
241985