rurban / re-engine-PCRE2

use pcre-jit instead of slow perl regex

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

'no jitsize 0' test fails on s390x where JIT is not available

ppisar opened this issue · comments

I noticed that 'no jitsize 0' test fails on s390x platform:

t/capture.t ............... ok
#   Failed test 'no jitsize 0'
#   at t/config.t line 72.
#          got: '155'
#     expected: '0'
# Looks like you failed 1 test of 37.
t/config.t ................ 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/37 subtests 

Reading the code, it looks like the XS code simply returns pcre2_pattern_info(..., PCRE2_INFO_JITSIZE, ...) value and that is documented as 0, so it looks like a bug in PCRE2. I will check it and forward it to PCRE2 authors if it's the cause.

I can reproduce it on x86_64 after passing --disable-jit to PCRE2's ./configure.

It's a copy-and-paste typo in the PCRE2.xs:612. There should be JITSIZE, not SIZE.

Fixed with 0.12