mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 10:00:40 +00:00
Fix a handling of dlsym(RTLD_NEXT) without loading libGL. Closes #1463
* The original fix leads to infinite recursion in GLX, EGL hooks.
Due to `dlopen` function override in `librenderdoc.so` library the
`Process::LoadModule` function always returns a handle of
`librenderdoc.so` instead of requested library. So instead of
`real function` we receive an address of the `hook` that leads
to the infinite recursion in this `hook`.
Fixes: 6d40bbb ('Add experimental wayland support. Refs #853')
Tested-by: Andrii Simiklit <andrii.simiklit@globallogic.com>
This commit is contained in:
committed by
Baldur Karlsson
parent
45fbb7b06d
commit
6ba58f153d
@@ -143,7 +143,8 @@ static void EnsureRealLibraryLoaded()
|
||||
if(!handle)
|
||||
handle = Process::LoadModule("libEGL.so.1");
|
||||
|
||||
eglhook.handle = handle;
|
||||
if(RenderDoc::Inst().IsReplayApp())
|
||||
eglhook.handle = handle;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -76,7 +76,8 @@ static void EnsureRealLibraryLoaded()
|
||||
if(!handle)
|
||||
handle = Process::LoadModule("libGLX.so.0");
|
||||
|
||||
glxhook.handle = handle;
|
||||
if(RenderDoc::Inst().IsReplayApp())
|
||||
glxhook.handle = handle;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user