summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
+}