Files
Peng Huang a8e98a2385 Fix gl::Context::unMakeCurrent crashes
The crash is because Display::makeCurrent() may fail, in that case,
egl_stubs.cpp will not update the current context in global_state and
Thread accordingly. And then Context::refCount could be reach 0,
and be released, however egl_stubs.cpp still thinks the context is
current, and then user-after-free happens.

This CL fixes the problem by updating current context of Thread in
Display::makeCurrent, and reading the current context of Thread in
egl_stubs.cpp and setting it to global_state.

Bug: chromium:1171371
Change-Id: Ifc5fffb0e4902c9c72514839d03e5783d50fe283
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3017210
Reviewed-by: Jonah Ryan-Davis <[email protected]>
Reviewed-by: Geoff Lang <[email protected]>
Commit-Queue: Peng Huang <[email protected]>
2021-07-12 20:56:04 +00:00
..
2020-01-06 16:25:35 +00:00
2020-09-25 14:47:29 +00:00
2019-07-09 14:47:30 +00:00