Skip to contentSkip to conversation

glDrawBuffer crashes in case of surfaceless context

Bug 102574 [email protected] 1 participant 2 messages Sep 7, 2017 – Sep 18, 2019

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=102574

Bug ID: 102574
Summary: glDrawBuffer crashes in case of surfaceless context
Product: Mesa
Version: 17.1
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: Drivers/DRI/i915
Assignee: [email protected]
Reporter: [email protected]
QA Contact: [email protected]

I've created a surfaceless OpenGL context using the EGL_KHR_surfaceless_context extension together with eglGetPlatformDisplay/EGL_PLATFORM_GBM_MESA. In this scenario there seem to be no valid default framebuffer which is Ok, as I'm normally only render to FBOs with textures bound. Due to an error on my side I called glDrawBuffer with GL_FRONT_LEFT while no FBO was bound.

This result in a crash in intel_buffers.c because in intelDrawBuffer() dri2InvalidateDrawable is called with a null pointer which is not checked in dri2InvalidateDrawable() or anywhere before.

While the root cause for triggering the error is on my side, I think it may be better to raise an error instead of crashing. So I propose to add a check to brw->driContext->driDrawablePriv within intelDrawBuffer. Probably if the driDrawablePriv is nullptr one should not call intel_prepare_render either.

Mesa 17.1 with Kernel 4.9.6 on Intel Apollo Lake GPU

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=102574

GitLab Migration User <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |MOVED

--- Comment #1 from GitLab Migration User <[email protected]> --- -- 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/778.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel