-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Segfault when enabling screen with changed modes #4730
Comments
When surf->gbm was previously set, we destroy it without setting it to NULL. Later on, we only create the GBM surface if surf->gbm is NULL. This result in a use-after-free when we start using surf->gbm. Closes: swaywm#1868 Closes: swaywm#1874 Closes: swaywm/sway#4785 Closes: swaywm/sway#4717 Closes: swaywm/sway#4730 Fixes: 2bdd1d0 ("backend/drm: use modifiers for our GBM buffers")
When surf->gbm was previously set, we destroy it without setting it to NULL. Later on, we only create the GBM surface if surf->gbm is NULL. This result in a use-after-free when we start using surf->gbm. Closes: #1868 Closes: #1874 Closes: swaywm/sway#4785 Closes: swaywm/sway#4717 Closes: swaywm/sway#4730 Fixes: 2bdd1d0 ("backend/drm: use modifiers for our GBM buffers")
This issue was unfortunately not fixed. Following backtrace is from
|
This one is a dup of #4717 |
When surf->gbm was previously set, we destroy it without setting it to NULL. Later on, we only create the GBM surface if surf->gbm is NULL. This result in a use-after-free when we start using surf->gbm. Closes: swaywm#1868 Closes: swaywm#1874 Closes: swaywm/sway#4785 Closes: swaywm/sway#4717 Closes: swaywm/sway#4730 Fixes: 2bdd1d0 ("backend/drm: use modifiers for our GBM buffers")
When surf->gbm was previously set, we destroy it without setting it to NULL. Later on, we only create the GBM surface if surf->gbm is NULL. This result in a use-after-free when we start using surf->gbm. Closes: swaywm#1868 Closes: swaywm#1874 Closes: swaywm/sway#4785 Closes: swaywm/sway#4717 Closes: swaywm/sway#4730 Fixes: 2bdd1d0 ("backend/drm: use modifiers for our GBM buffers")
When surf->gbm was previously set, we destroy it without setting it to NULL. Later on, we only create the GBM surface if surf->gbm is NULL. This result in a use-after-free when we start using surf->gbm. Closes: swaywm#1868 Closes: swaywm#1874 Closes: swaywm/sway#4785 Closes: swaywm/sway#4717 Closes: swaywm/sway#4730 Fixes: 2bdd1d0 ("backend/drm: use modifiers for our GBM buffers")
When surf->gbm was previously set, we destroy it without setting it to NULL. Later on, we only create the GBM surface if surf->gbm is NULL. This result in a use-after-free when we start using surf->gbm. Closes: swaywm#1868 Closes: swaywm#1874 Closes: swaywm/sway#4785 Closes: swaywm/sway#4717 Closes: swaywm/sway#4730 Fixes: 2bdd1d0 ("backend/drm: use modifiers for our GBM buffers")
When surf->gbm was previously set, we destroy it without setting it to NULL. Later on, we only create the GBM surface if surf->gbm is NULL. This result in a use-after-free when we start using surf->gbm. Closes: swaywm#1868 Closes: swaywm#1874 Closes: swaywm/sway#4785 Closes: swaywm/sway#4717 Closes: swaywm/sway#4730 Fixes: 2bdd1d0 ("backend/drm: use modifiers for our GBM buffers")
Did you find any solution @kennylevinsen ? I still have this issue randomly occurring during normal usage (not only when changing outputs). |
@Jasmich Open a new issue with logs and stacktrace. Crashes occurring during normal use is unlikely to be related to this issue. Also, compare segfaults from output changes and normal usage, just in case they are in fact different crashes. |
When surf->gbm was previously set, we destroy it without setting it to NULL. Later on, we only create the GBM surface if surf->gbm is NULL. This result in a use-after-free when we start using surf->gbm. Closes: swaywm#1868 Closes: swaywm#1874 Closes: swaywm/sway#4785 Closes: swaywm/sway#4717 Closes: swaywm/sway#4730 Fixes: 2bdd1d0 ("backend/drm: use modifiers for our GBM buffers")
Problem
After resuming from sleep and reenabling external displays, sway segfaults. This has happened twice with the same trace.
This may be connected to one screen of mine, which sometimes after waking registers with fewer modes than normal (only up to FHD rather than 4k). That this has occurred can be seen in the debug log.
The debug log shows an attempt to set "12336x0@600 mHz", which seems quite bogus.
Sway version
sway version 1.2-f576bcdb (Nov 5 2019, branch 'master')
Debug Log
Stack trace
The text was updated successfully, but these errors were encountered: