Skip to content

Conversation

@AtnNn
Copy link
Member

@AtnNn AtnNn commented Dec 21, 2016

This fixes #6202

This fix should make empty regexp patterns behave correctly and allow all other regexp patterns to hit the cache.

@AtnNn AtnNn added this to the 2.3.x milestone Dec 21, 2016
@srh
Copy link
Contributor

srh commented Dec 22, 2016

Does this mean that secondary indexes which had a .match could be in a broken, nonsensical state?

@AtnNn
Copy link
Member Author

AtnNn commented Dec 22, 2016

I hadn't thought of that. Indexes that call match with an empty string might be broken If env_t gets reused to compute indexes. A quick look at the code makes me think that they aren't being reused.

@srh
Copy link
Contributor

srh commented Dec 23, 2016

Secondary indexes are supposed to use their own env_t, yeah.

Okay, I get it now -- empty regexes are going to get clobbered and point at the wrong iterator. So secondary index functions that use an empty regex, followed by a non-empty regex, are going to run into trouble.

@AtnNn AtnNn modified the milestones: 2.3.6, 2.3.x, 2.4 Feb 2, 2017
@AtnNn AtnNn mentioned this pull request Feb 2, 2017
1 task
@srh
Copy link
Contributor

srh commented Dec 10, 2017

As far as I can tell, the patch in #6241 broke secondary index compatibility around this in 2.3.6, for those that were using empty regular expressions.

So now we can't make 2.4 offer a backwards-compatible implementation layer in either direction.

@srh srh mentioned this pull request Dec 10, 2017
1 task
@srh
Copy link
Contributor

srh commented Dec 10, 2017

See #6562.

@srh srh closed this Dec 10, 2017
@srh srh deleted the atnnn/6202 branch December 26, 2017 01:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

`match' sometimes returns the wrong result

3 participants