Bug 44151

Summary: glXDestroyWindow after glXDestroyContext -> Invalid read
Product: Mesa Reporter: Lauri Kasanen <cand>
Component: GLXAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Valgrind log

Description Lauri Kasanen 2011-12-26 03:45:27 UTC
Created attachment 54822 [details]
Valgrind log

Mesa 7fd8dc3 / r600g

On exit from any Irrlicht-using app (1.7.2, any of the GL examples will do), valgrind points out several invalid reads in r600_fence_reference.

The code in question is:
glXDestroyContext(display, Context);
if (glxWin)
        glXDestroyWindow(display, glxWin);

Which is a valid order, and also used in some of the mesa demos. Valgrind doesn't complain on those though. While this may be something irrlicht is doing wrong, there appears to be a check missing in Mesa that allows these invalid reads.
Comment 1 Michel Dänzer 2011-12-30 01:45:23 UTC
Fixed in commit 7dd2d29a560a53d42d15f9ac06ba2ee7cd312ed9 ('r600g: Manage fences per screen rather than per context.').

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.