[Bug 1361610] Re: libPCRE3 8.31 regex matching is not working

Mark Ebbers m.ebbers at i-real.nl
Tue May 24 13:47:34 UTC 2016


Arne,

Thank you for your quick reply but I don't think this solves my problem.
It only solves it for the proof-of-concept which I made to proof, the
bug in Poco regex functionality.

Our system does not even link against libPCRE but uses Poco. If I change
the proof-of-concept to a Poco only solution (see attachment) I still
have the problem of a non functioning regex.

$ g++ regex.cc -lPocoFoundation
$ ./a.out 
Poco 0x01030600 on Linux 4.2.0-35-generic @ x86_64
Poco  match 1234567890 to pattern ^[0-9]{10} matches? no
Poco  match 123456789 to pattern ^[0-9]{10} matches? no
$ ldd ./a.out 
	linux-vdso.so.1 =>  (0x00007ffe94177000)
	libPocoFoundation.so.9 => /usr/lib/libPocoFoundation.so.9 (0x00007f14dd744000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f14dd440000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f14dd229000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f14dce64000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f14dcc46000)
	libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f14dca07000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f14dc7ee000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f14dc5ea000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f14dc3e1000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f14dc0db000)
	/lib64/ld-linux-x86-64.so.2 (0x000055cbc9c93000)

$ LD_PRELOAD=/lib/x86_64-linux-gnu/libpcre.so.3 ./a.out 
Poco 0x01030600 on Linux 4.2.0-35-generic @ x86_64
Poco  match 1234567890 to pattern ^[0-9]{10} matches? yes
Poco  match 123456789 to pattern ^[0-9]{10} matches? no
$ LD_PRELOAD=/lib/x86_64-linux-gnu/libpcre.so.3 ldd ./a.out 
	linux-vdso.so.1 =>  (0x00007ffed2c4f000)
	/lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f34efa89000)
	libPocoFoundation.so.9 => /usr/lib/libPocoFoundation.so.9 (0x00007f34ef722000)
	libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f34ef41d000)
	libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f34ef207000)
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f34eee42000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f34eec23000)
	libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f34eea0a000)
	libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f34ee806000)
	librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f34ee5fd000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f34ee2f7000)
	/lib64/ld-linux-x86-64.so.2 (0x0000564cbde41000)


** Attachment added: "regex.cc"
   https://bugs.launchpad.net/ubuntu/+source/pcre3/+bug/1361610/+attachment/4669408/+files/regex.cc

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to pcre3 in Ubuntu.
https://bugs.launchpad.net/bugs/1361610

Title:
  libPCRE3 8.31 regex matching is not working

Status in pcre3 package in Ubuntu:
  Invalid
Status in poco package in Ubuntu:
  Confirmed

Bug description:
  It looks like that libPCRE3 8.31 included in Ubuntu 13.10 does not
  handle regex matching alright. This also affects the libPocoFoundation
  RegularExpression classes.

  I attached a proof-of-concept which tests a good and bad heystack
  string to a regex pattern with Poco, Boost and PCRE. I tested it on
  two different machines with the following output:

  Ubuntu 13.10 3.11.0-13-generic #20-Ubuntu SMP Wed Oct 23 17:26:33 UTC 2013 i686 i686 i686 GNU/Linux
  Poco 0x01030600 on Linux 3.11.0-13-generic @ i686
  Poco  match 1234567890 to pattern ^[0-9]{10} matches? no --> NOT CORRECT
  Poco  match 123456789 to pattern ^[0-9]{10} matches? no
  Boost match 1234567890 to pattern ^[0-9]{10} matches? yes
  Boost match 123456789 to pattern ^[0-9]{10} matches? no
  PCRE 8.31 2012-07-06
  PCRE  match 1234567890 to pattern ^[0-9]{10} matches? yes
  PRCE  match 123456789 to pattern ^[0-9]{10} matches? yes --> NOT CORRECT

  Ubuntu 12.04.3 LTS  3.8.0-29-generic #42~precise1-Ubuntu SMP Wed Aug 14 15:31:16 UTC 2013 i686 i686 i386 GNU/Linux
  Poco 0x01030600 on Linux 3.8.0-29-generic @ i686
  Poco  match 1234567890 to pattern ^[0-9]{10} matches? yes --> OK
  Poco  match 123456789 to pattern ^[0-9]{10} matches? no
  Boost match 1234567890 to pattern ^[0-9]{10} matches? yes
  Boost match 123456789 to pattern ^[0-9]{10} matches? no
  PCRE 8.12 2011-01-15
  PCRE  match 1234567890 to pattern ^[0-9]{10} matches? yes
  PRCE  match 123456789 to pattern ^[0-9]{10} matches? no --> OK

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pcre3/+bug/1361610/+subscriptions



More information about the foundations-bugs mailing list