Summary: | glcpp hangs parsing line continuations | ||
---|---|---|---|
Product: | Mesa | Reporter: | Vinson Lee <vlee> |
Component: | glsl-compiler | Assignee: | Carl Worth <cworth> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | medium | CC: | cworth |
Version: | git | Keywords: | have-backtrace, regression |
Hardware: | x86-64 (AMD64) | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Proposed fix |
Description
Vinson Lee
2013-05-29 05:52:54 UTC
2483039aca78078f21a57e8e950a0bc0181fbd3d is the first bad commit commit 2483039aca78078f21a57e8e950a0bc0181fbd3d Author: Carl Worth <cworth@cworth.org> Date: Thu Nov 29 14:49:46 2012 -0800 glcpp: Rewrite line-continuation support to act globally. Previously, we were only supporting line-continuation backslash characters within lines of pre-processor directives, (as per the specification). With OpenGL 4.2 and GLES3, line continuations are now supported anywhere within a shader. While changing this, also fix a bug where the preprocessor was ignoring line continuation characters when a line ended in multiple backslash characters. The new code is also more efficient than the old. Previously, we would perform a ralloc copy at each newline. We now perform copies only at each occurrence of a line-continuation. This commit fixes the line-continuation.vert test in piglit. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> :040000 040000 35d086bb98380598fee42c2d45c4f43e8f4ffba4 3abdae53c4494f0d170a2a11b9a65a7f6f17d159 M src bisect run success Thanks for the bug report. It's surprising how many bugs have been in the implementation of such a seemingly-simple feature. I'll get right on working on a fix for this one. -Carl Created attachment 80246 [details] [review] Proposed fix This patch should fix the bug. I've just submitted this to the mesa list. Thanks again for the bug report, and the nice small test case. -Car Fixed by d8eeb1d330c52aad734cc553e41b457e6727275c. commit d8eeb1d330c52aad734cc553e41b457e6727275c Author: Carl Worth <cworth@cworth.org> Date: Mon Jun 3 11:35:43 2013 -0700 glcpp: Fix post-decrement underflow in loop-control variable This loop-control condition with a post-decrement operator would lead to an underflow of collapsed_newlines. This in turn would cause a subsequent execution of the loop to labor inordinately trying to return the loop-control variable to a value of 0 again. Fix this by dis-intertwining the test and the decrement. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=65112 Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> |
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.