apitrace/apitrace — pull request #203 by lawlove (2013-12-06 02:26:31+00:00)
Title: Apitrace replay: Fix "apitrace replay" regression when used with fips

It was noticed that "fips apitrace replay " was no longer
printing out data.

Carl Worth tracked down the cause to SHA1# patch:
7700f74 2013-06-15 Prevent infinite recursion with Steam's overlay.

which introduces a new method of retrieving "dlsym" in file
glproc_gl.cpp to prevent interception by the Steam overlay and
consequent SIGSEGV (or infinite recursion). However this prevents fips
from injecting it's own libraries.

This patch creates an additional library that is used by glretrace to
link against using the old method instead of the new one.

The approach was to maintain both methods of retrieving dlsym by
modifying glproc_gl.cpp with #ifdef. An additional static lib is
built using a -D to compile for the old method. The retrace
CMakeLists.txt was modified to link against this added library.

For testing, followed instructions from
https://github.com/apitrace/apitrace/wiki/Steam#linux

Confirmed that removing SHA 7700f74 patch causes SIGSEGV when running
apitrace with Steam.

Confirmed that with this patch:
* "apitrace trace steam ..." uses the newer method of accessing dlsym
* "apitrace replay ..." uses the old method of accessing dlsym
* "fips apitrace replay ..." outputs data.

Signed-off-by: Lawrence L Love