When I call glDrawElements and one of the used vbo has no data uploaded (but is set for some attribute), I get a segfault ending there: 0xf687f487 in drm_intel_bo_reference () from /usr/lib/libdrm_intel.so.1 I didn’t have debug symbols but the glDrawElements first called into /usr/lib/libdricore9.2.4.so.1 and then into /usr/lib/xorg/modules/dri/i965_dri.so before /usr/lib/libdrm_intel.so.1 If you need any more information just ask me.
Here is an example program (from http://open.gl/) reproducing that issue: http://linkmauve.fr/files/mesa_testcase.cpp To compile it: g++ -DGL_GLEXT_PROTOTYPES -lsfml-window -lsfml-system -lGL mesa_testcase.cpp Line 47 is commented, this was the call I forgot that made this segfault happen. If I also comment line 46, I get this segfault instead (but with an error before): 0xf7d7c6b6 in __memcpy_ssse3_rep () from /usr/lib/libc.so.6
I've reproduced the bug with older Mesa but master appears to not crash. Will try to bisect which change has fixed this issue.
I confirm it is fixed in 10.0.2, same computer, same kernel.
This bug got fixed with following commit since intel_bufferobj_buffer allocates a buffer which previously did not exist yet. I've checked with valgrind and there's no problem with the use case, I will still check if we are supposed to trigger an error for this. --------------- 8< ---------------------- commit 060a49a8966d923ad9c02d6f200baacb7ff081d4 Author: Eric Anholt <eric@anholt.net> Date: Thu Oct 3 19:34:41 2013 -0700 i965: Drop intel_bufferobj_source().
I did not find that any error should occur from GL, buffer object exists but its data is undefined in this case. I'm marking this as resolved/fixed.
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.