On Thu, 5 Apr 2018, Daniel Richard G. wrote:
> * Test 6 also fails because line 4932 of testinput6 contains a Ctrl-Z
> character, which on DOS/Windows indicates EOF.
I have removed that character. That test looks to have come from a
fuzzer as it is so weird. Removing the character does not alter the
result of the test.
> * The following JIT tests failed:
>
> 8 bit: Test should not match: [644] 'a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaa' @ 'aaaaaaaaaaaaaaaaaaaaaaa'
> 16 bit: Test should not match: [644] 'a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaa' @ 'aaaaaaaaaaaaaaaaaaaaaaa'
> 32 bit: Test should not match: [644] 'a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaa' @ 'aaaaaaaaaaaaaaaaaaaaaaa'
> 8 bit: Test should not match: [647] '(?:a*)*b' @ 'aaaaaaaaaaaaaaaaaaaaaaaa b'
> 16 bit: Test should not match: [647] '(?:a*)*b' @ 'aaaaaaaaaaaaaaaaaaaaaaaa b'
> 32 bit: Test should not match: [647] '(?:a*)*b' @ 'aaaaaaaaaaaaaaaaaaaaaaaa b'
> 8 bit: Test should not match: [648] '(?:a*?)*?b' @ 'aaaaaaaaaaaaaaaaaaaaaaaa b'
> 16 bit: Test should not match: [648] '(?:a*?)*?b' @ 'aaaaaaaaaaaaaaaaaaaaaaaa b'
> 32 bit: Test should not match: [648] '(?:a*?)*?b' @ 'aaaaaaaaaaaaaaaaaaaaaaaa b'
>
> I couldn't make heads or tails of the code, and so am hoping someone
> here may recognize what's going on.
All these tests are cases that should fail like this example:
PCRE2 version 10.31 2018-02-12
'(?:a*)*b'jitverify
aaaaaaaaaaaaaaaaaaaaaaaa b
Failed: error -47: match limit exceeded
The same result is given with or without the use of JIT. The message
"should not match" is output by the JIT test program when a test that is
expected to fail succeeds. On my Linux box, the match succeeds when the
number of "a" characters is reduced by 3:
PCRE2 version 10.31 2018-02-12
'(?:a*)*b'jitverify
aaaaaaaaaaaaaaaaaaaaa b
0: b (JIT)
Reducing the match limit causes this example to fail. Again, this also
works without JIT. So the problem is why is the match limit not biting
in your environment? Did you change the default when you build PCRE2?
The default default is 10000000 (10 million) and is defined in
src/config.h. Doubling it allows the pattern to match:
PCRE2 version 10.31 2018-02-12
'(?:a*)*b'jitverify
aaaaaaaaaaaaaaaaaaaaaa b
Failed: error -47: match limit exceeded
aaaaaaaaaaaaaaaaaaaaaa b\=match_limit=20000000
0: b (JIT)
Philip
--
Philip Hazel