Bug 37425 - Segfault doing glReadPixels of stencil buffer
Summary: Segfault doing glReadPixels of stencil buffer
Status: RESOLVED DUPLICATE of bug 37351
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Ian Romanick
QA Contact:
URL: https://github.com/apitrace/apitrace
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-20 17:27 UTC by Jose Fonseca
Modified: 2011-05-20 17:33 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
tri-tex.trace (4.02 KB, application/octet-stream)
2011-05-20 17:27 UTC, Jose Fonseca
Details

Description Jose Fonseca 2011-05-20 17:27:04 UTC
Created attachment 46967 [details]
tri-tex.trace

Doing 

  glretrace -D 37 tri-tex.trace

where tri-tex.trace is attached, causes:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff4e303b5 in get_row_z24 (ctx=0x7ffff7fd6010, z24rb=0xb23e30, count=250, x=0, y=1, values=0x7ffffffddbd0) at main/depthstencil.c:128
128	         dst[i] = src[i] & 0xffffff;
(gdb) bt
#0  0x00007ffff4e303b5 in get_row_z24 (ctx=0x7ffff7fd6010, z24rb=0xb23e30, count=250, x=0, y=1, values=0x7ffffffddbd0) at main/depthstencil.c:128
#1  0x00007ffff4d5b20c in _swrast_read_depth_span_float (ctx=0x7ffff7fd6010, rb=0xb23e30, n=250, x=0, y=1, depth=0x7ffffffedc30) at swrast/s_depth.c:1298
#2  0x00007ffff4d625af in read_depth_pixels (ctx=0x7ffff7fd6010, x=0, y=1, width=250, height=250, type=5121, pixels=0xb39650, packing=0x7fffffffdcd0)
    at swrast/s_readpix.c:132
#3  0x00007ffff4d63542 in _swrast_ReadPixels (ctx=0x7ffff7fd6010, x=0, y=0, width=250, height=250, format=6402, type=5121, packing=0x7ffff7fe5670, 
    pixels=0xb39650) at swrast/s_readpix.c:496
#4  0x00007ffff4bbd963 in intelReadPixels (ctx=0x7ffff7fd6010, x=0, y=0, width=250, height=250, format=6402, type=5121, pack=0x7ffff7fe5670, pixels=0xb39650)
    at intel_pixel_read.c:200
#5  0x00007ffff4ca4fac in _mesa_ReadnPixelsARB (x=0, y=0, width=250, height=250, format=6402, type=5121, bufSize=2147483647, pixels=0xb39650)
    at main/readpix.c:248
#6  0x00007ffff4ca4ffe in _mesa_ReadPixels (x=0, y=0, width=250, height=250, format=6402, type=5121, pixels=0xb39650) at main/readpix.c:256
#7  0x0000000000507a17 in glstate::dumpDrawBufferImage (json=..., format=6402) at /home/jfonseca/projects/apitrace/glstate.cpp:451
#8  0x00000000005080d7 in glstate::dumpDrawBuffers (json=..., dumpDepth=24 '\030', dumpStencil=8 '\b') at /home/jfonseca/projects/apitrace/glstate.cpp:592
#9  0x00000000005081c3 in glstate::dumpFramebuffer (json=...) at /home/jfonseca/projects/apitrace/glstate.cpp:618
#10 0x0000000000508406 in glstate::dumpCurrentContext (os=...) at /home/jfonseca/projects/apitrace/glstate.cpp:687
#11 0x0000000000505f3c in glretrace::display () at /home/jfonseca/projects/apitrace/glretrace_main.cpp:206
#12 0x0000000000506334 in glretrace::main (argc=4, argv=0x7fffffffe0a8) at /home/jfonseca/projects/apitrace/glretrace_main.cpp:294
(gdb) 

I run git bisect and got

6ab9889a2704304a45b4da5b28840af08f6f42c5 is the first bad commit
commit 6ab9889a2704304a45b4da5b28840af08f6f42c5
Author: Eric Anholt <eric@anholt.net>
Date:   Fri Apr 15 12:58:17 2011 -0700

    mesa: Use _mesa_get_format_bytes to refactor out the RB get_pointer_*
    
    Reviewed-by: Brian Paul <brianp@vmware.com>
Comment 1 Jose Fonseca 2011-05-20 17:33:15 UTC
Nevermind, just noticed it's a dup of bug 37351.

*** This bug has been marked as a duplicate of bug 37351 ***


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.