skia/skia/d65f91e3bd779b74bbbd7dc3d60229438fb32350
Flush and submit GPU work before returning in Image_BorrowTextureFrom_2
Image_BorrowTextureFrom_2 passes the address of stack variable 'x' as
the ReleaseContext to SkImages::BorrowTextureFrom. Without flushing and
submitting dContext before draw() returns, releaseCallback is invoked
after draw() has exited when fiddle_main flushes the surface,
dereferencing a dangling stack pointer and crashing the fiddle process.
Bug: b/579332562
Change-Id: I2d22b57b0d890e02099141097cd5a7e28dac0b9f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1415476
Commit-Queue: Eric Boren <borenet@google.com>
Reviewed-by: Thomas Smith <thomsmit@google.com>
1 file changed