Bug 1298576 - Add crash test for WebGL shader compiler. r=jgilbert
authorEthan Lin <ethlin@mozilla.com>
Thu, 20 Oct 2016 15:05:08 +0800
changeset 319010 d85c7e9afe3ffc44f34e1e1b7890c5f347c1abaf
parent 319009 24b1342fe710a067ba90b5a2eca5eb3e2b0bf6c1
child 319011 d26188b4eddd291be9ee955bfe1974d5115675db
push id30858
push userryanvm@gmail.com
push dateSun, 23 Oct 2016 17:17:41 +0000
treeherdermozilla-central@a9a41b69f3f9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs1298576
milestone52.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1298576 - Add crash test for WebGL shader compiler. r=jgilbert
dom/canvas/crashtests/1298576-1.html
dom/canvas/crashtests/crashtests.list
new file mode 100644
--- /dev/null
+++ b/dom/canvas/crashtests/1298576-1.html
@@ -0,0 +1,21 @@
+<!DOCTYPE html>
+<html>
+<head>
+<script id="fshader" type="x-shader/x-fragment">
+void main() {
+  -2147483648 % 0xffffffff;
+  gl_FragColor = vec4(0.5, 0.5, 1.0, 1.0);
+}
+</script>
+</head>
+<body>
+<script>
+var gl = document.createElement('canvas').getContext('webgl');
+var program = gl.createProgram();
+var fshader = gl.createShader(gl.FRAGMENT_SHADER);
+var fshaderSource = document.getElementById("fshader").text;
+gl.shaderSource(fshader, fshaderSource);
+gl.compileShader(fshader);
+</script>
+</body>
+</html>
--- a/dom/canvas/crashtests/crashtests.list
+++ b/dom/canvas/crashtests/crashtests.list
@@ -33,9 +33,10 @@ load 1284578-1.html
 skip-if(d2d) load 1287515-1.html
 load 1287652-1.html
 load 1288872-1.html
 load 1290628-1.html
 load 1283113-1.html
 load 1286458-1.html
 load 1299062-1.html
 load 1305312-1.html
+load 1298576-1.html