Bug 44614 - [gl] Segmentation fault while swapping buffers without active context
Summary: [gl] Segmentation fault while swapping buffers without active context
Status: VERIFIED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Anuj Phogat
QA Contact:
URL:
Whiteboard:
Keywords:
: 44361 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-10 01:28 UTC by Yi Sun
Modified: 2012-01-16 21:37 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Piglit case to verify swapping buffers without active context. (2.04 KB, text/plain)
2012-01-10 01:32 UTC, Yi Sun
Details

Description Yi Sun 2012-01-10 01:28:53 UTC
System Environment:
--------------------------
Arch:           x86_64
Platform:       IronLake 
Libdrm: Libdrm: (master)2.4.29-3-gef20301a11afae50bfe127002913dbd0b81ddccc
Mesa:           (master)ec4851253bbf7fd7d11c5570f19f9733a885e471
Xserver:       
(master)xorg-server-1.11.99.1-56-gfb22a408c69a84f81905147de9e82cf66ffb6eb2
Kernel:    (drm-intel-next)097354eb14fa94d31a09c64d640643f58e4a5a9a

Bug detailed description:
-------------------------
Rendered a triangle, then deselected the current active context. Afterwards, the segmentation fault will occur so long as swap buffer with function glXSwapBuffers.
Comment 1 Yi Sun 2012-01-10 01:32:21 UTC
Created attachment 55371 [details]
Piglit case to verify swapping buffers without active context.
Comment 2 Anuj Phogat 2012-01-11 17:33:37 UTC
I'm able to reproduce the bug. Sent out a patch on mesa-dev@lists.freedesktop.org to fix the issue.
Comment 3 Ian Romanick 2012-01-12 12:25:10 UTC
*** Bug 44361 has been marked as a duplicate of this bug. ***
Comment 4 Anuj Phogat 2012-01-16 19:00:56 UTC
Here is link for the patch pushed on mesa: http://comments.gmane.org/gmane.comp.video.mesa3d.devel/35999

commit log: 

commit dd7220652e65a8a23e7739eeee687f3d6a865b80
Author: Anuj Phogat <anuj.phogat@gmail.com>
Date:   Wed Jan 11 15:26:10 2012 -0800

    intel: Fix segfault in glXSwapBuffers with no bound context
    
    Calling glXSwapBuffers with no bound context causes segmentation
    fault in function intelDRI2Flush. All the gl calls should be
    ignored after setting the current context to null. So the contents
    of framebuffer stay unchanged. But the driver should not seg fault.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=44614
    
    Reported-by: Yi Sun <yi.sun@intel.com>
    Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Tested-by: Yi Sun <yi.sun@intel.com>
Comment 5 Yi Sun 2012-01-16 21:37:46 UTC
The patch is on the upstream.
Verified it.


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.