Bug 109596 - Crashes on glXBindTexImageEXT call on surface whose Window got destroyed
Summary: Crashes on glXBindTexImageEXT call on surface whose Window got destroyed
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/swrast (show other bugs)
Version: 18.3
Hardware: Other Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-02-09 00:51 UTC by Samuel Thibault
Modified: 2019-09-18 18:45 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
proposed fix (1.70 KB, text/plain)
2019-02-09 00:51 UTC, Samuel Thibault
Details

Description Samuel Thibault 2019-02-09 00:51:39 UTC
Created attachment 143345 [details]
proposed fix

Hello,

As reported on

https://gitlab.com/compiz/compiz-core/issues/141

compiz is getting crashes during a glXBindTexImageEXT call about a window getting unmapped. This happens in the swraster. I traced it into swrastGetDrawableInfo(), whose XGetGeometry call fails because the window is no more. The attached patch avoids the issue, I tend to think that at the very least an assert should be used to avoid leaking uninitialized values, but returning an empty geometry would avoid a crash in such case, the caller just has to be able to cope with it.

If this (calling glXBindTexImageEXT on a drawable whose Window is no more) is considered to be an issue in the application, please answer to https://gitlab.com/compiz/compiz-core/issues/141

Samuel
Comment 1 Adam Jackson 2019-02-11 17:40:50 UTC
Well, X being the asynchronous thing it is there's always a chance this can happen, so I don't think this is an application issue. I assume the crash is avoided with this patch because compiz has already set an X error handler.

The "more right" thing to do might be to install our own error handler around xlib calls so we can properly bubble the error up to BindTexImage's caller, but that's quite a lot more complicated for not a lot of benefit.
Comment 2 GitLab Migration User 2019-09-18 18:45:52 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/327.


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.