Mesa (master): glcpp: Add test case for recently fixed loop-control underflow bug.

Carl Worth cworth at kemper.freedesktop.org
Mon Jun 3 20:33:53 UTC 2013


Module: Mesa
Branch: master
Commit: 610fe6da7909c96ae8fa85d93ece5c2e5c2d729b
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=610fe6da7909c96ae8fa85d93ece5c2e5c2d729b

Author: Carl Worth <cworth at cworth.org>
Date:   Mon Jun  3 12:49:10 2013 -0700

glcpp: Add test case for recently fixed loop-control underflow bug.

To trigger the bug, it suffices to have a line-continuation followed by
a newline and then a non-line-continuation backslash.

Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

---

 ...e-continuation-and-non-continuation-backslash.c |   12 ++++++++++++
 ...ation-and-non-continuation-backslash.c.expected |   13 +++++++++++++
 2 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/src/glsl/glcpp/tests/117-line-continuation-and-non-continuation-backslash.c b/src/glsl/glcpp/tests/117-line-continuation-and-non-continuation-backslash.c
new file mode 100644
index 0000000..6a6f282
--- /dev/null
+++ b/src/glsl/glcpp/tests/117-line-continuation-and-non-continuation-backslash.c
@@ -0,0 +1,12 @@
+/* This test case is the minimal case to replicate the bug reported here:
+ *
+ * https://bugs.freedesktop.org/show_bug.cgi?id=65112
+ *
+ * To trigger the bug, there must be a line-continuation sequence
+ * (backslash newline), then an additional newline character, and
+ * finally another backslash that is not part of a line-continuation
+ * sequence.
+ */
+\
+
+/* \ */
diff --git a/src/glsl/glcpp/tests/117-line-continuation-and-non-continuation-backslash.c.expected b/src/glsl/glcpp/tests/117-line-continuation-and-non-continuation-backslash.c.expected
new file mode 100644
index 0000000..9b3eb67
--- /dev/null
+++ b/src/glsl/glcpp/tests/117-line-continuation-and-non-continuation-backslash.c.expected
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+ 
+
+
+ 
+




More information about the mesa-commit mailing list