Synchronize in ~ImageImplementation
The egl::Image destructor synchronizes with the threads accessing that image.
However, that is too late because by the time ~Image runs, ImageImplementation
has already been destructed - concurrently with the other threads running, i.e.
data race. In particular, since those threads access virtual member functions on
Image, they may end up calling the base class ones (which are pure) instead of
the derived class ones.
So make sure to synchronize in ~ImageImplementation instead.
Bug: swiftshader:62
Change-Id: I91240d1dbb45dd126c65d86f9aecf77833b4488d
Reviewed-on: https://swiftshader-review.googlesource.com/10029Reviewed-by:
Nicolas Capens <capn@google.com>
Reviewed-by:
Alexis Hétu <sugoi@google.com>
Tested-by:
Nicolas Capens <capn@google.com>
Showing
Please
register
or
sign in
to comment