Bug 59499 - SIGSEGV src/mesa/swrast/s_blit.c:546
Summary: SIGSEGV src/mesa/swrast/s_blit.c:546
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2013-01-17 06:10 UTC by Vinson Lee
Modified: 2013-01-17 16:43 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2013-01-17 06:10:23 UTC
mesa: 56c01d81094795286828ecb83713e043695e905a (master)

Run piglit fbo-srgb-blit on swrast.

$ ./bin/fbo-srgb-blit -auto
Mesa warning: failed to remap index 167
Mesa warning: failed to remap index 207
Mesa warning: failed to remap index 208
Mesa warning: failed to remap index 211
Mesa warning: failed to remap index 377
Segmentation fault (core dumped)

(gdb) bt
#0  0x00007f9031b8738f in blit_linear (ctx=0xe0bed0, srcX0=7, srcY0=7, srcX1=9, srcY1=9, dstX0=0, dstY0=0, dstX1=8, dstY1=16) at ../../../src/mesa/swrast/s_blit.c:546
#1  0x00007f9031b87f20 in _swrast_BlitFramebuffer (ctx=0xe0bed0, srcX0=7, srcY0=7, srcX1=9, srcY1=9, dstX0=0, dstY0=0, dstX1=8, dstY1=16, mask=16384, filter=9729)
    at ../../../src/mesa/swrast/s_blit.c:812
#2  0x00007f9031a3123b in _mesa_BlitFramebuffer (srcX0=7, srcY0=7, srcX1=9, srcY1=9, dstX0=0, dstY0=0, dstX1=8, dstY1=16, mask=16384, filter=9729) at ../../../src/mesa/main/fbobject.c:3057
#3  0x0000000000401076 in blit_rect (src_format=35907, dst_format=32856, x=-1, y=0, w=1, h=1, stretch=true) at piglit/tests/fbo/fbo-srgb-blit.c:66
#4  0x00000000004012d6 in piglit_display () at piglit/tests/fbo/fbo-srgb-blit.c:114
#5  0x00007f9035517408 in display () at piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:60
#6  0x00007f9034ed1137 in fghRedrawWindow (window=0xe07e60) at freeglut_main.c:210
#7  fghcbDisplayWindow (window=0xe07e60, enumerator=0x7fffab7497a0) at freeglut_main.c:227
#8  0x00007f9034ed4889 in fgEnumWindows (enumCallback=0x7f9034ed10d0 <fghcbDisplayWindow>, enumerator=0x7fffab7497a0) at freeglut_structure.c:394
#9  0x00007f9034ed15fa in fghDisplayAll () at freeglut_main.c:249
#10 glutMainLoopEvent () at freeglut_main.c:1450
#11 0x00007f9034ed1f05 in glutMainLoop () at freeglut_main.c:1498
#12 0x00007f90355175e0 in run_test (gl_fw=0x7f90357e17e0, argc=1, argv=0x7fffab749b68) at piglit/tests/util/piglit-framework-gl/piglit_glut_framework.c:127
#13 0x00007f9035515726 in piglit_gl_test_run (argc=1, argv=0x7fffab749b68, config=0x7fffab749a50) at piglit/tests/util/piglit-framework-gl.c:127
#14 0x0000000000400e9e in main (argc=2, argv=0x7fffab749b68) at piglit/tests/fbo/fbo-srgb-blit.c:41
(gdb) frame 0
#0  0x00007f9031b8738f in blit_linear (ctx=0xe0bed0, srcX0=7, srcY0=7, srcX1=9, srcY1=9, dstX0=0, dstY0=0, dstX1=8, dstY1=16) at ../../../src/mesa/swrast/s_blit.c:546
546	   gl_format drawFormat = _mesa_get_srgb_format_linear(drawRb->Format);
(gdb) print drawRb
$1 = (struct gl_renderbuffer *) 0x0


bed997dabaada5e7c8081db08f93a6f1b5932e8b is the first bad commit
commit bed997dabaada5e7c8081db08f93a6f1b5932e8b
Author: Anuj Phogat <anuj.phogat@gmail.com>
Date:   Tue Dec 11 20:17:47 2012 -0800

    mesa: Add support to allow blitting to multiple color draw buffers
    
    This patch fixes a blitting case when drawAttachment->Texture ==
    readAttachment->Texture. It was causing an assertion failure in
    intel_miptree_attach_map() with gles3 conformance test case:
    framebuffer_blit_functionality_minifying_blit
    
    Number of changes in this file look scary. But most of them are caused
    by introducing a big for loop to support rendering to multiple color
    draw buffers.
    
    V2: Fixed a case when number of draw buffer attachments are zero.
    V3: Put a for loop in blit_nearest() and blit_linear() functions in to
        support blitting to multiple color draw buffers.
    V4: Remove variable declaration in for loop to avoid MSVC compilation
        issues.
    
    Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>

:040000 040000 98d5e6ea72f2fcf765cd8241682ab18c8081cc70 ee017ce78ded09098a4ded7a90e19130b53e4eea M	src
bisect run success
Comment 1 Brian Paul 2013-01-17 16:43:28 UTC
Fixed by commit 57ddf1227fffbfda52c9310f9092c036ad4558b6


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.