summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-03-18 12:29:21 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-20 15:58:03 +0100
commite4ecb159e7701fe4b7a3595fcb7541dfb3d3649d (patch)
tree27a56e59327951565b89d87e44b9f48759a5debf
parent41299c2b095394a0fca4abed874b84261d8319ba (diff)
evas/render: fix log ptr access in render thread
when this lock is released, the evas may be immediately freed, leading to invalid access in the log call Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11536
-rw-r--r--src/lib/evas/canvas/evas_render.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/evas_render.c b/src/lib/evas/canvas/evas_render.c
index 4738c80480..db9f14bf1f 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -3943,9 +3943,11 @@ evas_render_pipe_wakeup(void *data)
3943 Render_Updates *ru; 3943 Render_Updates *ru;
3944 Evas_Public_Data *evas = data; 3944 Evas_Public_Data *evas = data;
3945 Efl_Canvas_Output *out; 3945 Efl_Canvas_Output *out;
3946 Evas *e;
3946 3947
3947 eina_evlog("+render_pipe_wakeup", evas->evas, 0.0, NULL); 3948 eina_evlog("+render_pipe_wakeup", evas->evas, 0.0, NULL);
3948 eina_spinlock_take(&(evas->render.lock)); 3949 eina_spinlock_take(&(evas->render.lock));
3950 e = evas->evas;
3949 EINA_LIST_FOREACH(evas->outputs, ll, out) 3951 EINA_LIST_FOREACH(evas->outputs, ll, out)
3950 { 3952 {
3951 if (!out->output) continue ; 3953 if (!out->output) continue ;
@@ -3967,7 +3969,8 @@ evas_render_pipe_wakeup(void *data)
3967 } 3969 }
3968 eina_spinlock_release(&(evas->render.lock)); 3970 eina_spinlock_release(&(evas->render.lock));
3969 evas_async_events_put(data, 0, NULL, evas_render_async_wakeup); 3971 evas_async_events_put(data, 0, NULL, evas_render_async_wakeup);
3970 eina_evlog("-render_pipe_wakeup", evas->evas, 0.0, NULL); 3972 /* use local pointer to avoid data race with 'evas' deref after releasing lock */
3973 eina_evlog("-render_pipe_wakeup", e, 0.0, NULL);
3971} 3974}
3972 3975
3973EAPI void 3976EAPI void