diff options
author | Kenneth Graunke <[email protected]> | 2012-10-22 10:56:46 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2012-10-25 14:52:53 -0700 |
commit | 9142ade15416415f2d5eb20b093b898c649cd2bb (patch) | |
tree | 48292bfda5326e7696bc830fe31320cf860c50df /src/mesa | |
parent | eeb2fb72eb4f573410eae45896bc744d6c47b4d6 (diff) |
glcpp: Don't use infinite lookhead for #define differentiation.
Previously, we used lookahead patterns to differentiate:
#define FOO(x) function macro
#define FOO (x) object macro
Unfortunately, our rule for function macros:
{HASH}define{HSPACE}+/{IDENTIFIER}"("
relies on infinite lookahead, and apparently triggers a Flex bug where
the generated code overflows a state buffer (see YY_STATE_BUF_SIZE).
There's no need to use infinite lookahead. We can simply change state,
match the identifier, and use a single character lookahead for the '('.
This apparently makes Flex not generate the giant state array, which
avoids the buffer overflow, and should be more efficient anyway.
Fixes piglit test 17000-consecutive-chars-identifier.frag.
NOTE: This is a candidate for every release branch ever.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Carl Worth <[email protected]>
Diffstat (limited to 'src/mesa')
0 files changed, 0 insertions, 0 deletions