summaryrefslogtreecommitdiff
path: root/tests/bugs
diff options
context:
space:
mode:
authorWiktor Janas <wixorpeek@gmail.com>2010-11-26 18:50:17 -0800
committerVinson Lee <vlee@vmware.com>2010-11-26 18:50:17 -0800
commit09f5d25f8fcdc8f25254277b2bed1c887ad10ac2 (patch)
treea4514e24f00f8c86d1bff3bd5e764f8563c50fa4 /tests/bugs
parent2543043c810d7c387e7a87c20347cad86ddcaf81 (diff)
fdo31934: Add test case from FDO bug 31934.
Diffstat (limited to 'tests/bugs')
-rw-r--r--tests/bugs/fdo31934.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/bugs/fdo31934.c b/tests/bugs/fdo31934.c
new file mode 100644
index 000000000..025c02dfb
--- /dev/null
+++ b/tests/bugs/fdo31934.c
@@ -0,0 +1,25 @@
+#include <stdlib.h>
+
+#define GL_GLEXT_PROTOTYPES
+#include <GL/gl.h>
+#include <GL/glut.h>
+
+int main (int argc, char *argv[])
+{
+ glutInit(&argc, argv);
+ glutInitDisplayMode(GLUT_RGBA);
+ glutInitWindowSize(512,512);
+ glutCreateWindow("");
+
+ GLuint id;
+ glGenBuffersARB(1, &id);
+ glBindBufferARB(GL_ARRAY_BUFFER_ARB, id);
+ glBufferDataARB(GL_ARRAY_BUFFER_ARB, 0, NULL, GL_STATIC_DRAW);
+ glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
+
+ glBindBufferARB(GL_ARRAY_BUFFER_ARB, id);
+ glMapBuffer(GL_ARRAY_BUFFER_ARB, GL_READ_WRITE_ARB); /* CRASH! */
+ glBindBufferARB(GL_ARRAY_BUFFER_ARB, 0);
+
+ return 0;
+}