[Mesa-dev] [Bug 65173] segfault in _mesa_get_format_datatype and _mesa_get_color_read_type when state dumping with glretrace

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu May 30 14:35:01 PDT 2013


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

--- Comment #7 from José Fonseca <jfonseca at vmware.com> ---
(In reply to comment #6)
> Hmm, could we get another person (Jose?) to try this too?

Yep, it happens here too. ctx->ReadBuffer->_ColorReadBuffer is NULL in
_mesa_get_color_read_type. This is the full stack backtrace (this time debug
build):

Program received signal SIGSEGV, Segmentation fault.
_mesa_get_color_read_type (ctx=0xbed310) at src/mesa/main/framebuffer.c:905
905       const GLenum data_type = _mesa_get_format_datatype(
(gdb) bt
#0  _mesa_get_color_read_type (ctx=0xbed310) at src/mesa/main/framebuffer.c:905
#1  0x00007ffff4ed67f8 in find_custom_value (ctx=0xbed310, d=0x7ffff608ca88,
v=0x7fffffffb550) at src/mesa/main/get.c:696
#2  0x00007ffff4ed75ef in find_value (func=0x7ffff5a0328c "glGetIntegerv",
pname=35738, p=0x7fffffffb548, v=0x7fffffffb550)
    at src/mesa/main/get.c:1099
#3  0x00007ffff4ed7d69 in _mesa_GetIntegerv (pname=35738,
params=0x7fffffffce88) at src/mesa/main/get.c:1299
#4  0x000000000043255a in _glGetIntegerv (pname=35738, params=0x7fffffffce88)
    at /home/jfonseca/projects/apitrace/dispatch/glproc.hpp:4802
#5  0x000000000045bb28 in glstate::dumpParameters (json=..., context=...)
    at /home/jfonseca/projects/apitrace/retrace/glstate_params.cpp:14881
#6  0x000000000042e3ee in glstate::dumpCurrentContext (os=...) at
/home/jfonseca/projects/apitrace/retrace/glstate.cpp:169
#7  0x000000000042c86a in GLDumper::dumpState (this=0x909d10, os=...)
    at /home/jfonseca/projects/apitrace/retrace/glretrace_main.cpp:445
#8  0x000000000041fb9d in retrace::retraceCall (call=0xbd8f40) at
/home/jfonseca/projects/apitrace/retrace/retrace_main.cpp:197
#9  0x00000000004219ec in retrace::RelayRunner::runLeg (this=0x98a720,
call=0xbd8f40)
    at /home/jfonseca/projects/apitrace/retrace/retrace_main.cpp:342
#10 0x00000000004218d2 in retrace::RelayRunner::runRace (this=0x98a720)
    at /home/jfonseca/projects/apitrace/retrace/retrace_main.cpp:313
#11 0x000000000041fe9a in retrace::RelayRace::run (this=0x7fffffffde30)
    at /home/jfonseca/projects/apitrace/retrace/retrace_main.cpp:480
#12 0x0000000000420072 in retrace::mainLoop () at
/home/jfonseca/projects/apitrace/retrace/retrace_main.cpp:541
#13 0x0000000000420879 in main (argc=4, argv=0x7fffffffe068) at
/home/jfonseca/projects/apitrace/retrace/retrace_main.cpp:804

The proposed patch fixes it.

I don't know if the ctx->ReadBuffer check is necessary but I suppose it doesn't
hurt.

In summary: looks good to me.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130530/ff7efce5/attachment.html>


More information about the mesa-dev mailing list