Bug 82472 - piglit 16385-consecutive-chars regression
Summary: piglit 16385-consecutive-chars regression
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Mesa core (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Kenneth Graunke
QA Contact:
URL:
Whiteboard:
Keywords: bisected, regression
: 82487 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-08-11 19:16 UTC by Vinson Lee
Modified: 2014-08-22 22:18 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vinson Lee 2014-08-11 19:16:03 UTC
mesa: 23d782067ae834ad53522b46638ea21c62e94ca3 (master 10.3.0-devel)

$ ./bin/glslparsertest tests/glslparsertest/glsl2/16385-consecutive-chars.frag pass 1.10
Aborted (core dumped)

04e40fd337a244ee77ef9553985e9398ff0344af is the first bad commit
commit 04e40fd337a244ee77ef9553985e9398ff0344af
Author: Carl Worth <cworth@cworth.org>
Date:   Tue Jul 1 16:31:07 2014 -0700

    glsl/glcpp: Treat CR+LF pair as a single newline
    
    The GLSL specification says that either carriage-return, line-feed, or both
    together can be used to terminate lines. Further, it says that when used
    together, the pair of terminators shall be interpreted as a single line.
    
    This final requirement has not been respected by glcpp up until now, (it has
    been emitting two newlines for every CR+LF pair).
    
    Here, we fix the lexer by using a regular expression for NEWLINE that eats
    up both "\r\n" (or even "\n\r") if possible before also considering a single
    '\n' or a single '\r' as a line terminator.
    
    Before this commit, the test results are as follows:
    
    	\r:	135/143 tests pass
    	\r\n:	  4/143 tests pass
    	\n\r:	  4/143 tests pass
    
    After this commit, the test results are as follows:
    
    	\r:	135/143 tests pass
    	\r\n:	140/143 tests pass
    	\n\r:	139/143 tests pass
    
    So, obviously, a dramatic improvement.
    
    Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>

:040000 040000 1f73084ed2a50bab0d7561b087f8c9ae3a480322 e696705124b77a67588c80b91c9e68c56a2586b9 M	src
bisect run success
Comment 1 Kenneth Graunke 2014-08-16 01:09:33 UTC
*** Bug 82487 has been marked as a duplicate of this bug. ***
Comment 2 Kenneth Graunke 2014-08-16 05:01:27 UTC
Patch on mailing list:
http://lists.freedesktop.org/archives/mesa-dev/2014-August/065907.html
Comment 3 Carl Worth 2014-08-22 22:18:47 UTC
Should be fixed now with the following commit to master:

commit 23163df24cf96107ee8ccb372db20f49e9d88948
Author: Carl Worth <cworth@cworth.org>
Date:   Mon Aug 18 11:36:12 2014 -0700

    glcpp: Don't use alternation in the lookahead for empty pragmas.
    
    We've found that there's a buffer overrun bug in flex that's triggered by
    using alternation in a lookahead pattern.
    
    Fortunately, we don't need to match the exact {NEWLINE} expression to
    detect an empty pragma. It suffices to verify that there are no non-space
    characters before any newline character. So we can use a simple [\r\n] to
    get the desired behavior while avoiding the flex bug.
    
    Fixes the regression of piglit's 17000-consecutive-chars-identifier test,
    (which has been crashing since commit
    04e40fd337a244ee77ef9553985e9398ff0344af ).
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=82472
    Signed-off-by: Carl Worth <cworth@cworth.org>
    Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
    
    CC: <mesa-stable@lists.freedesktop.org>


bug/show.html.tmpl processed on Feb 24, 2017 at 21:52:23.
(provided by the Example extension).