[SERVER-39693] Fix bug in PCRE which reports error for valid regex Created: 20/Feb/19  Updated: 29/Oct/23  Resolved: 27/Feb/19

Status: Closed
Project: Core Server
Component/s: Querying
Affects Version/s: None
Fix Version/s: 4.1.9

Type: Bug Priority: Major - P3
Reporter: Ian Boros Assignee: Ian Boros
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by SERVER-39697 Regex MatchExpression should error at... Closed
is depended on by SERVER-39698 Make $regexFind, $regexFindAll, and $... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Query 2019-03-11
Participants:

 Description   

We ran into this issue in SERVER-30986, but had to revert it due to a bug in our version of PCRE. Since that ticket already has a fix version and other jira metadata, we'll use this ticket to keep track of the work of fixing the bug in PCRE, as described in this bugzilla thread.



 Comments   
Comment by Andrew Morrow (Inactive) [ 25/Nov/19 ]

Thanks ian.boros, I will exclude them from the backport.

Comment by Ian Boros [ 25/Nov/19 ]

acm

I'm confident the above three commits would only be necessary to backport if we were to also backport SERVER-39697. There are no plans to backport SERVER-39697, so I wouldn't worry about them.

Comment by Githook User [ 27/Feb/19 ]

Author:

{'name': 'Ian Boros', 'username': 'puppyofkosh', 'email': 'puppyofkosh@gmail.com'}

Message: SERVER-39693 fix PCRE support for start option (*LF)
Branch: master
https://github.com/mongodb/mongo/commit/282091aa51aa04eb42da6a5f30e693595ef2cb46

Comment by Githook User [ 27/Feb/19 ]

Author:

{'name': 'Ian Boros', 'username': 'puppyofkosh', 'email': 'puppyofkosh@gmail.com'}

Message: SERVER-39693 Add unit tests to pcrecpp

Note: Originally this patch also set up pcrecpp_unittest.cc to run
as a C++ unit test along with the rest of the server. This caused
some issues, so we abandoned it. I am leaving the new unit tests, however,
in case we need to patch PCRE again and run the tests during development.

Changes to PCRE made by MongoDB (not the original authors) are tested
through the $regex expression.
Branch: master
https://github.com/mongodb/mongo/commit/b3bd75fc2f404931729e0c00992053b03859f817

Comment by Githook User [ 27/Feb/19 ]

Author:

{'name': 'Ian Boros', 'username': 'puppyofkosh', 'email': 'puppyofkosh@gmail.com'}

Message: SERVER-39693 patch by Philip Hazel to fix PCRE start options bug
Branch: master
https://github.com/mongodb/mongo/commit/258994bfbb96683af66b7414cb679f5549107a26

Generated at Thu Feb 08 04:52:50 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.