Skip to content

Clean up X11 EGLDisplay when NativeConnectionWrapper created it#364

Merged
jdm merged 1 commit into
servo:mainfrom
mrobinson:clean-up-egl-display
Jun 7, 2026
Merged

Clean up X11 EGLDisplay when NativeConnectionWrapper created it#364
jdm merged 1 commit into
servo:mainfrom
mrobinson:clean-up-egl-display

Conversation

@mrobinson
Copy link
Copy Markdown
Member

@mrobinson mrobinson commented Jun 7, 2026

This changes fixes an issue where creating an EGLDisplay could return
a version against an invalid X11 Display. It seems that Mesa internally
caches live EGLDisplays against the X11 Display pointer. If we close
the X11 Display without terminating the EGLDisplay, a fresh X11
Display with the same pointer address can return the defunct
EGLDisplay. This change fixes that issue by no longer leaking our
EGLDisplay.

@mrobinson mrobinson force-pushed the clean-up-egl-display branch from a0617f2 to b1e9925 Compare June 7, 2026 08:27
This changes fixes and issue where creating an `EGLDisplay` could return
a version against an invalid X11 `Display`. It seems that Mesa internally
caches live `EGLDisplay`s against the X11 `Display` pointer. If we close
the X11 Display without terminating the `EGLDisplay`, a fresh X11
`Display` with the same pointer address can return the defunct
`EGLDisplay`. This change fixes that issue by no longer leaking our
`EGLDisplay`.

Signed-off-by: Martin Robinson <mrobinson@abandonedwig.info>
@mrobinson mrobinson force-pushed the clean-up-egl-display branch from b1e9925 to fcce18d Compare June 7, 2026 08:35
@mrobinson mrobinson changed the title Clean up X11 EGLDisplay when NativeConnectionWrapper created it Clean up X11 EGLDisplay when NativeConnectionWrapper created it Jun 7, 2026
@jdm jdm added this pull request to the merge queue Jun 7, 2026
Merged via the queue into servo:main with commit 9b620f9 Jun 7, 2026
29 checks passed
@mrobinson mrobinson deleted the clean-up-egl-display branch June 7, 2026 10:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants