Bug 30605 - [swrast] SIGSEGV swrast/s_texfilter.c:3000
Summary: [swrast] SIGSEGV swrast/s_texfilter.c:3000
Status: CLOSED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium critical
Assignee: Brian Paul
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: mesa-7.9
  Show dependency treegraph
 
Reported: 2010-10-04 13:44 UTC by Vinson Lee
Modified: 2010-10-05 17:34 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Vinson Lee 2010-10-04 13:44:11 UTC
mesa: 68c7994ab5d86cdbfcba75b7f6c3ad734b9fb6b0 (master) - SIGSEGV
mesa: 2cdfda8851e919f26d0a4c77f6141895e4b86e38 (7.9) - SIGSEGV
mesa: 3af43c0b4c29f7cb82df72d0b65bcd190053f57c (7.8) - pass

Run piglit glsl-fs-shadow2d-bias test.

$ ./bin/shader_runner tests/shaders/glsl-fs-shadow2d-bias.shader_test -auto

(gdb) 
#0  0x002d169b in sample_depth_texture (ctx=0x9620638, tObj=0x9ce0248, n=1, texcoords=0xbffbf78c, lambda=0xbffbf6c8, texel=0xbffbf698) at swrast/s_texfilter.c:3000
#1  0x003d1fc0 in fetch_texel_lod (ctx=0x9620638, texcoord=0xbffbf78c, lambda=1, unit=0, color=0xbffbf77c) at swrast/s_fragprog.c:76
#2  0x002a2c03 in fetch_texel (ctx=0x9620638, machine=0x9661314, inst=0x9ce01d0, texcoord=0xbffbf78c, lodBias=1, color=0xbffbf77c) at program/prog_execute.c:404
#3  0x002a66d1 in _mesa_execute_program (ctx=0x9620638, program=0x9986748, machine=0x9661314) at program/prog_execute.c:1671
#4  0x003d2492 in run_program (ctx=0x9620638, span=0xbffc3a64, start=0, end=249) at swrast/s_fragprog.c:209
#5  0x003d27e9 in _swrast_exec_fragment_program (ctx=0x9620638, span=0xbffc3a64) at swrast/s_fragprog.c:265
#6  0x002c2bb0 in shade_texture_span (ctx=0x9620638, span=0xbffc3a64) at swrast/s_span.c:997
#7  0x002c3227 in _swrast_write_rgba_span (ctx=0x9620638, span=0xbffc3a64) at swrast/s_span.c:1163
#8  0x002e3b61 in general_triangle (ctx=0x9620638, v0=0xb72bd020, v1=0xb72bd208, v2=0xb72bd5d8) at swrast/s_tritemp.h:819
#9  0x002b5bc3 in _swrast_validate_triangle (ctx=0x9620638, v0=0xb72bd020, v1=0xb72bd208, v2=0xb72bd5d8) at swrast/s_context.c:366
#10 0x002b65ee in _swrast_Triangle (ctx=0x9620638, v0=0xb72bd020, v1=0xb72bd208, v2=0xb72bd5d8) at swrast/s_context.c:709
#11 0x002e80c1 in triangle_rgba (ctx=0x9620638, e0=0, e1=1, e2=3) at swrast_setup/ss_tritmp.h:176
#12 0x002e80f2 in quadfunc_rgba (ctx=0x9620638, v0=0, v1=1, v2=2, v3=3) at swrast_setup/ss_tritmp.h:232
#13 0x0027c8cb in _tnl_render_quads_verts (ctx=0x9620638, start=0, count=4, flags=55) at tnl/t_vb_rendertmp.h:383
#14 0x0027e6d7 in run_render (ctx=0x9620638, stage=0x96768d8) at tnl/t_vb_render.c:321
#15 0x0026f909 in _tnl_run_pipeline (ctx=0x9620638) at tnl/t_pipeline.c:153
#16 0x00270bd4 in _tnl_draw_prims (ctx=0x9620638, arrays=0x9664cac, prim=0xbffc4c20, nr_prims=1, ib=0x0, min_index=0, max_index=3) at tnl/t_draw.c:478
#17 0x00270941 in _tnl_vbo_draw_prims (ctx=0x9620638, arrays=0x9664cac, prim=0xbffc4c20, nr_prims=1, ib=0x0, index_bounds_valid=1 '\001', min_index=0, max_index=3) at tnl/t_draw.c:384
#18 0x00262bc2 in vbo_exec_DrawArrays (mode=7, start=0, count=4) at vbo/vbo_exec_array.c:526
#19 0x00253f9d in neutral_DrawArrays (mode=7, start=0, count=4) at main/vtxfmt_tmp.h:327
#20 0x0804e351 in piglit_draw_rect (x=-1, y=-1, w=2, h=2) at /usr/local/src/piglit/tests/util/piglit-util.c:689
#21 0x0804c5fa in piglit_display () at piglit/tests/shaders/shader_runner.c:673
#22 0x0804eeb3 in display () at piglit/tests/util/piglit-framework.c:52
#23 0x00606820 in ?? () from /usr/lib/libglut.so.3
#24 0x0060a660 in fgEnumWindows () from /usr/lib/libglut.so.3
#25 0x00606cdb in glutMainLoopEvent () from /usr/lib/libglut.so.3
#26 0x00607605 in glutMainLoop () from /usr/lib/libglut.so.3
#27 0x0804f05c in main (argc=2, argv=0xbffc5164) at piglit/tests/util/piglit-framework.c:118
(gdb) frame 0
#0  0x002d169b in sample_depth_texture (ctx=0x9620638, tObj=0x9ce0248, n=1, texcoords=0xbffbf78c, lambda=0xbffbf6c8, texel=0xbffbf698) at swrast/s_texfilter.c:3000
3000	   const GLint width = img->Width;
(gdb) info locals
level = 1
img = 0x0
width = 0
height = 0
depth = 0
compare_coord = 0
ambient = 0
function = 0
result = 0
__PRETTY_FUNCTION__ = "sample_depth_texture"
Comment 1 Vinson Lee 2010-10-04 14:28:48 UTC
The crash occurs before and after the glsl2 merge.

git bisect bad 6c03c576cc49bbb008de66d374f4302ff0fe0390
git bisect bad 15a3b42e135a3a2cb463ec3cff80a55dd8528051
Comment 2 Vinson Lee 2010-10-04 14:41:59 UTC
The crash occurs at the shader-file-reorg merge (2010 Jun 11).

git bisect bad ec2b92f98c2e7f161521b447cc1d9a36bce3707c
Comment 3 Vinson Lee 2010-10-04 15:00:30 UTC
The crash occurs at the graw-tests merge (2010 May 14).

git bisect bad c7ac03d3964400169ba0dd769e06796c9830aee1
Comment 4 Vinson Lee 2010-10-04 15:09:57 UTC
piglit glsl-fs-shadow2d-bias passes at the gallium-dynamicstencilref merge (2010 Feb 12).

git bisect good 0087f9dc0690e5de139f89ea4577b1824b918757
Comment 5 Vinson Lee 2010-10-04 15:38:14 UTC
2b5de09b3ea8754fb004d4f216bca29303f99490 is the first bad commit
commit 2b5de09b3ea8754fb004d4f216bca29303f99490
Author: Brian Paul <brianp@vmware.com>
Date:   Tue Mar 23 17:55:41 2010 -0600

    swrast: improve depth texture mipmap selection
    
    We still don't do proper min/mag filtering but this is better than just
    sampling the base mipmap level all the time.
    
    Fixes piglit depth-level-clamp test.  Fixes fd.o bug 27256.

:040000 040000 df45cad5ad0657b356c7472c5eea1a1e9052a303 9a4258e852c08e4d8934765d29c4cc7c9a6f2a82 M	src
bisect run success
Comment 6 Brian Paul 2010-10-04 19:02:10 UTC
Looks like the Sep 30 change to the test itself exposed this bug.

Fixed in Mesa/master with commit fb5e6f88fc426e53af26e98d1c336222a8952cc5.
I'll cherry-pick this to the 7.9 branch after you verify the fix, Vinson.
Comment 7 Vinson Lee 2010-10-05 13:09:46 UTC
mesa: 2cf3199ee3b0014bc426bc3163dfa279c00eabb3 (master)

Verified that the crash is fixed.
Comment 8 Brian Paul 2010-10-05 13:36:24 UTC
OK, cherry-picked to 7.9 now too.
Comment 9 Vinson Lee 2010-10-05 17:34:37 UTC
mesa: 34c518be52958c9facd294955a81286293a6ed0b (7.9)

Verified fixed on 7.9 branch.


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.