Zero-minimum possessive groups does not match empty string

Bug #1456195 reported by Arne de Bruijn
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
pcre3 (Ubuntu)
Fix Released
Medium
Unassigned
Trusty
Fix Released
Medium
Michael Terry
Wily
Fix Released
Medium
Michael Terry
Xenial
Fix Released
Medium
Unassigned

Bug Description

The 14.04/15.04 pcre version doesn't match some inputs with possessive qualfiers:

$ echo '"a"'|pcregrep '("([^b"]*+(b.)?)*+")*+'
$

Earlier versions (10.04, 12.04):
$ echo '"a"'|pcregrep '("([^b"]*+(b.)?)*+")*+'
"a"
$

this is fixed with the following upstream commit (that applies cleanly to the 15.04 pcre):

http://vcs.pcre.org/pcre?view=revision&revision=1478

https://lists.exim.org/lurker/message/20140527.131833.2fd7547c.html

Revision history for this message
Arne de Bruijn (arbruijn) wrote :

Upstream patch ported to pcre 8.31 for 14.04

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "pcre-8.31-zero-repeat-bug.patch" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Mathew Hodson (mhodson)
Changed in pcre3 (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Marc Deslauriers (mdeslaur) wrote :

Thanks for the patch. Could you please prepare a debdiff for trusty and wily suitable for sponsoring as an SRU?

Thanks!

Changed in pcre3 (Ubuntu Xenial):
status: New → Fix Released
Changed in pcre3 (Ubuntu Trusty):
status: New → Confirmed
Changed in pcre3 (Ubuntu Wily):
status: New → Confirmed
Revision history for this message
Arne de Bruijn (arbruijn) wrote :

Like this?

Revision history for this message
Arne de Bruijn (arbruijn) wrote :

Note for wily the testcase needs to be slightly changed:

echo '"a"'|pcregrep --no-jit '("([^b"]*+(b.)?)*+")++'

(expected output is unchanged: "a")

Mathew Hodson (mhodson)
Changed in pcre3 (Ubuntu Trusty):
importance: Undecided → Medium
Changed in pcre3 (Ubuntu Wily):
importance: Undecided → Medium
Revision history for this message
Michael Terry (mterry) wrote :

Thank you Arne! I've uploaded the trusty patch, please help test when it gets published in -proposed.

Changed in pcre3 (Ubuntu Trusty):
assignee: nobody → Michael Terry (mterry)
status: Confirmed → In Progress
Revision history for this message
Michael Terry (mterry) wrote :

The wily patch doesn't apply cleanly (there have been releases in -updates since wily got released).

Revision history for this message
Michael Terry (mterry) wrote :

Nope, that was just a brain fart on my part. I've uploaded to wily too now, thanks.

Changed in pcre3 (Ubuntu Wily):
assignee: nobody → Michael Terry (mterry)
status: Confirmed → In Progress
Revision history for this message
Brian Murray (brian-murray) wrote : Please test proposed package

Hello Arne, or anyone else affected,

Accepted pcre3 into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pcre3/2:8.35-7.1ubuntu1.4 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in pcre3 (Ubuntu Wily):
status: In Progress → Fix Committed
tags: added: verification-needed
Changed in pcre3 (Ubuntu Trusty):
status: In Progress → Fix Committed
Revision history for this message
Brian Murray (brian-murray) wrote :

Hello Arne, or anyone else affected,

Accepted pcre3 into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/pcre3/1:8.31-2ubuntu2.3 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Revision history for this message
Arne de Bruijn (arbruijn) wrote :

Thank you Michael for uploading the patched version. I've tested the package in trusty and wily and the bug is fixed in both.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pcre3 - 2:8.35-7.1ubuntu1.4

---------------
pcre3 (2:8.35-7.1ubuntu1.4) wily; urgency=medium

  * Fix empty-matching possessive zero-repeat groups bug (LP: #1456195)

 -- Arne <ubuntu@2ar.nl> Wed, 13 Apr 2016 10:16:14 +0000

Changed in pcre3 (Ubuntu Wily):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for pcre3 has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pcre3 - 1:8.31-2ubuntu2.3

---------------
pcre3 (1:8.31-2ubuntu2.3) trusty; urgency=medium

  * Fix empty-matching possessive zero-repeat groups bug (LP: #1456195)

 -- Arne de Bruijn <ubuntu@2ar.nl> Wed, 13 Apr 2016 10:51:02 +0200

Changed in pcre3 (Ubuntu Trusty):
status: Fix Committed → Fix Released
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.