Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fix a crash in process termination when EGL and GLX are both loaded. #105
Conversation
aritger
approved these changes
Oct 25, 2016
This seems reasonable to me. I imagine this could also be triggered by dlclosing libGLX and libEGL, in addition to process termination.
kbrenneman
referenced this pull request
Oct 25, 2016
Closed
crash in eglFini from libglvnd libEGL #103
kbrenneman
merged commit 28867bb
into
NVIDIA:master
Oct 25, 2016
kbrenneman
deleted the
kbrenneman:fix-issue-103
branch
Oct 25, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
kbrenneman commentedOct 24, 2016
Added a new function to libGLdispatch, __glDispatchForceUnpatch, which forces
it to unpatch the OpenGL entrypoints before libEGL or libGLX can unload the
vendor library that patched them.
If a vendor patches the OpenGL entrypoints, libGLdispatch doesn't unpatch them
when that vendor's context is no longer current, because that adds too much
overhead to repeated MakeCurrent+LoseCurrent calls. But, that also means that
the patch callbacks end up being dangling pointers after the vendor library is
unloaded.
This mainly shows up at process termination when a process loads both libEGL
and libGLX, because __glxFini and __eglFini will both call the vendor's
threadAttach callback.
Fixes #103