Created attachment 39273 [details] [review]
Prevents the crash in wincopy when pressing f
Run wincopy and press the f key to go to front buffer
wincopy will crash, running gdb shows this..
GNU gdb (GDB) Fedora (7.1-34.fc13)
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-redhat-linux-gnu".
For bug reporting instructions, please see:
Reading symbols from /home/kdekorte/git/mesa/progs/xdemos/wincopy...done.
Starting program: /home/kdekorte/git/mesa/progs/xdemos/wincopy
[Thread debugging using libthread_db enabled]
Press Esc to exit
Press 'f' to toggle front/back buffer drawing
Drawing to GL_FRONT buffer
Program received signal SIGSEGV, Segmentation fault.
st_Clear (ctx=0xb34a40, mask=1) at state_tracker/st_cb_clear.c:479
479 if (!strb->surface)
Missing separate debuginfos, use: debuginfo-install expat-2.0.1-10.fc13.x86_64 glibc-2.12.1-2.x86_64 libX11-1.3.1-3.fc13.x86_64 libXau-1.0.5-1.fc12.x86_64 libXdamage-1.1.2-2.fc13.x86_64 libXext-1.1.2-2.fc13.x86_64 libXfixes-4.0.4-2.fc13.x86_64 libXxf86vm-1.1.0-1.fc13.x86_64 libdrm-2.4.22-1.fc13.x86_64 libgcc-4.4.4-10.fc13.x86_64 libstdc++-4.4.4-10.fc13.x86_64 libtalloc-2.0.1-1.fc13.x86_64 libv4l-0.8.1-1.fc13.x86_64 libxcb-1.5-1.fc13.x86_64
#0 st_Clear (ctx=0xb34a40, mask=1) at state_tracker/st_cb_clear.c:479
#1 0x00000000004013f7 in Redraw () at wincopy.c:156
#2 0x0000000000401605 in EventLoop () at wincopy.c:232
#3 0x0000000000401987 in main (argc=<value optimized out>,
argv=<value optimized out>) at wincopy.c:312
(gdb) print strb
$1 = (struct st_renderbuffer *) 0x0
Patch to correct is attached
Tested with r600g, color tiling is off and application is xdemos/wincopy
Pressing F still crashes git c3ed27ec76c5456412122d7e654a2e298409cc88
bug still present in git fa62cf7450595b3d99259b5a212df301ca711d4b
and patch still seems to correct it.
Looks like a core mesa issue.
Alex, are you sure this is core mesa issue as the code does not crash on my intel based machine.
(In reply to comment #5)
> Alex, are you sure this is core mesa issue as the code does not crash on my
> intel based machine.
It looks like a gallium state tracker bug. The Intel drivers don't use gallium.
mesa: aedbf05d31c1a8d7d3c2742524abf2db2422b2fe (master)
swrast - ok
softpipe - crash
llvmpipe - crash
Fixed with commit efbd33aff93d875af95d40db018b7911a3f87d02
on Aug 30, 2016 at 20:47:38.
(provided by the Example extension).