Hi. Phil Hazel recently released PCRE 7.4, which addresses some hardcoded limits in prior versions of PCRE (which include version 7.0, which has been integrated in Nevada).
Here are the two relevant excerpts from the 7.4 ChangeLog: 7. Change 7.0/38 introduced a new limit on the number of nested non-capturing parentheses; I made it 1000, which seemed large enough. Unfortunately, the limit also applies to "virtual nesting" when a pattern is recursive, and in this case 1000 isn't so big. I have been able to remove this limit at the expense of backing off one optimization in certain circumstances. Normally, when pcre_exec() would call its internal match() function recursively and immediately return the result unconditionally, it uses a "tail recursion" feature to save stack. However, when a subpattern that can match an empty string has an unlimited repetition quantifier, it no longer makes this optimization. That gives it a stack frame in which to save the data for checking that an empty string has been matched. Previously this was taken from the 1000-entry workspace that had been reserved. So now there is no explicit limit, but more stack is used. 9. There were some crude static tests to avoid integer overflow when computing the size of patterns that contain repeated groups with explicit upper limits. As the maximum quantifier is 65535, the maximum group length was set at 30,000 so that the product of these two numbers did not overflow a 32-bit integer. However, it turns out that people want to use groups that are longer than 30,000 bytes (though not repeat them that many times). Change 7.0/17 (the refactoring of the way the pattern size is computed) has made it possible to implement the integer overflow checks in a much more dynamic way, which I have now done. The artificial limitation on group length has been removed - we now have only the limit on the total length of the compiled pattern, which depends on the LINK_SIZE setting. I would like to upgrade PCRE to 7.4. Do these changes require a new ARC Case for PCRE ? These changes are not binary incompatible with the Nevada PCRE. There have been no API changes. --Stefan -- Stefan Teleman Sun Microsystems, Inc. Stefan.Teleman at Sun.COM
