X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=wrappers%2Fgltrace.py;h=63ddf9d663d351a7a2049036335a22ea5d97d2d4;hb=9d9eb81d94075181c360d4712b9fd3baa58d5782;hp=7bf2a3507a4169dec9b56c8ef5cdcf055fb09408;hpb=e0f0a970dfa16eb6923f0962f2d3095c39973278;p=apitrace diff --git a/wrappers/gltrace.py b/wrappers/gltrace.py index 7bf2a35..63ddf9d 100644 --- a/wrappers/gltrace.py +++ b/wrappers/gltrace.py @@ -757,6 +757,15 @@ class GlTracer(Tracer): if function.name in self.marker_functions: return + # We may be faking KHR_debug, so ensure the pointer queries result is + # always zeroed to prevent dereference of unitialized pointers + if function.name == 'glGetPointerv': + print ' if (params &&' + print ' (pname == GL_DEBUG_CALLBACK_FUNCTION ||' + print ' pname == GL_DEBUG_CALLBACK_USER_PARAM)) {' + print ' *params = NULL;' + print ' }' + if function.name in self.getProcAddressFunctionNames: else_ = '' for marker_function in self.marker_functions: