gl: remove invalid read and write 78/251478/2 submit/tizen/20210115.062052 submit/tizen/20210117.211744
authorShinwoo Kim <cinoo.kim@samsung.com>
Thu, 14 Jan 2021 04:47:06 +0000 (13:47 +0900)
committerShinwoo Kim <cinoo.kim@samsung.com>
Thu, 14 Jan 2021 07:03:34 +0000 (16:03 +0900)
commitc5b98e18a14b6ff4d0995eac741bf43038b0bcc5
tree4df673b370f977f8db7f9f87202bdea0cbc3513b
parent9dc4da8a654c30e738049a958576bfd8ec411e83
gl: remove invalid read and write

Summary:
There could be 2 evas_gl_image referencing 1 evas_gl_texture.
evas_object_image_orient_set could make this case.
In this case, when one evas_gl_image is removed(free), the evas_gl_texture
is not removed because its reference count.
After this point, if the other evas_gl_image is removed without drawing
(see function evas_gl_common_image_draw, line "im->tex->im = im")
then evas_gl_texture is reading invalid adress when it is removed.

Reviewers: Hermet, jsuya, herb, devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D12229

Change-Id: I6e7dc894ab314a45ddaadeba709ea2b35360b43a
src/modules/evas/engines/gl_common/evas_gl_common.h
src/modules/evas/engines/gl_common/evas_gl_image.c
src/modules/evas/engines/gl_common/evas_gl_texture.c