libpcre3 1:8.31-2ubuntu2 : not ready for --enable-jit option

Bug #1270862 reported by Tony Reix
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcre3 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Version 8.31 of libpcre3 (pcre3 sources) is not ready for --enable-jit option on Linux/PPC64 LE. It even does not compile.

Version 8.34 of libpcre3 does include code for Linux on PPC64-LE. However, this code still fails for JIT. It is being fixed now.
Staty tune with: http://bugs.exim.org/show_bug.cgi?id=1430 .

The current version 8.31 of libpcre3 on Ybuntu PPC64/LE should be replaced by the version (8.35 ?) that fixes the JIT issues on PPC64/LE (it is OK on PPC64/BE).

/home/tony/PCRE/pcre3-8.31:

In file included from sljit/sljitNativePPC_common.c:417:0,
                 from sljit/sljitLir.c:1251,
                 from pcre_jit_compile.c:62:
sljit/sljitNativePPC_64.c: In function 'sljit_set_function_context':
sljit/sljitNativePPC_64.c:425:9: error: dereferencing pointer to incomplete type
  context->addr = addr ? addr : ptrs[0];
         ^
sljit/sljitNativePPC_64.c:426:9: error: dereferencing pointer to incomplete type
  context->r2 = ptrs[1];
         ^
sljit/sljitNativePPC_64.c:427:9: error: dereferencing pointer to incomplete type
  context->r11 = ptrs[2];

pcre-8.34:

make check-TESTS
make[2]: Entering directory `/home/tony/PCRE/pcre-8.XX/trunk'
make[3]: Entering directory `/home/tony/PCRE/pcre-8.XX/trunk'
./test-driver: line 107: 32524 Illegal instruction (core dumped) "$@" > $log_file 2>&1
FAIL: pcre_jit_test

$ lsb_release -rd
Description: Ubuntu Trusty Tahr (development branch)
Release: 14.04

$ lsb_release -rd
Description: Ubuntu Trusty Tahr (development branch)
Release: 14.04
tony@tony1:~/PCRE/pcre3-8.31$ apt-cache policy libpcre3
libpcre3:
  Installed: 1:8.31-2ubuntu2
  Candidate: 1:8.31-2ubuntu2
  Version table:
 *** 1:8.31-2ubuntu2 0
        500 http://ports.ubuntu.com/ubuntu-ports/ trusty/main ppc64el Packages
        100 /var/lib/dpkg/status

Revision history for this message
Tony Reix (tony-reix) wrote :

Here is the trace when building PCRE 8.31 from Ubuntu sources:

sudo dpkg-buildpackage

...

CC_FOR_BUILD=cc CPPFLAGS="-D_FORTIFY_SOURCE=2" CFLAGS="-Wall -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security" LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro" \
     ./configure \
  --host=powerpc64le-linux-gnu --build=powerpc64le-linux-gnu \
  --prefix=/usr --mandir=\${prefix}/share/man \
  --infodir=\${prefix}/share/info \
  --libdir=\${prefix}/lib/powerpc64le-linux-gnu \
  --enable-utf8 --enable-unicode-properties \
  --disable-silent-rules

No JIT, and no 16bit library.

pcre-8.31 configuration summary:

    Install prefix .................. : /usr
    C preprocessor .................. : powerpc64le-linux-gnu-gcc -E
    C compiler ...................... : powerpc64le-linux-gnu-gcc
    C++ preprocessor ................ : powerpc64le-linux-gnu-g++ -E
    C++ compiler .................... : powerpc64le-linux-gnu-g++
    Linker .......................... : /usr/bin/ld
    C preprocessor flags ............ : -D_FORTIFY_SOURCE=2
    C compiler flags ................ : -Wall -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security
    C++ compiler flags .............. : -O2
    Linker flags .................... : -Wl,-Bsymbolic-functions -Wl,-z,relro
    Extra libraries ................. :

    Build 8 bit pcre library ........ : yes
    Build 16 bit pcre library ....... : no
    Build C++ library ............... : yes
    Enable JIT compiling support .... : no
    Enable UTF-8/16 support ......... : yes
    Unicode properties .............. : yes
    Newline char/sequence ........... : lf
    \R matches only ANYCRLF ......... : no
    EBCDIC coding ................... : no
    Rebuild char tables ............. : no
    Use stack recursion ............. : yes
    POSIX mem threshold ............. : 10
    Internal link size .............. : 2
    Match limit ..................... : 10000000
    Match limit recursion ........... : MATCH_LIMIT
    Build shared libs ............... : yes
    Build static libs ............... : yes
    Use JIT in pcregrep ............. : no
    Buffer size for pcregrep ........ : 20480
    Link pcregrep with libz ......... : no
    Link pcregrep with libbz2 ....... : no
    Link pcretest with libedit ...... : no
    Link pcretest with libreadline .. : no

PASS: pcrecpp_unittest
PASS: pcre_scanner_unittest
PASS: pcre_stringpiece_unittest
PASS: RunTest
PASS: RunGrepTest

In order to check that all main PCRE features run fine on Ubuntu/PPC/LE, at least the following options should be added to the ./configure line:
--enable-shared=no --enable-pcre16 --enable-pcre32 --enable-unicode-properties --enable-jit

Using --enable-jit with this 8.31 version will not work; too old for PPC. Use fresher version, like 8.34 . However, work is still being done for making JIT test OK on PCRE 8.34 on Ubuntu/PPC/LE (ABI issue).

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.