Posted by BassistJimmyJam on January 10, 2013 at 1:32am
2 followers
| Project: | Views |
| Version: | 7.x-3.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Issue Summary
The regular expressions in views_break_phrase() can cause a segmentation fault if there is a large number of arguments passed to the view due to the amount of recursion. This can be solved one of two ways:
- Change
pcre.backtrack_limitto a more reasonable value. The question here is: what is reasonable? Relying on the end-user to set this appropriately for their installation may be a bit much to ask considering the relative obscurity of this feature. - Refactor the regular expressions to avoid the amount of recursion causing the segmentation fault, namely the
([0-9]+[+ ])+portion.
Comments
#1
Patch attached.
#2
How many arguments did you passed into the view to cause a seg.fault? Is this a number you can estimate?
In general there are multiple issues in both views and drupal issue queue to simplify the regular expression.
#3
I had over 7000 arguments being passed to the view. I'm not sure what the minimum number of arguments would be that would cause this issue. I searched the views issue queue before posting but was unable to find any issues addressing these specific regular expressions.
#4
Yeah maybe not that easy to find, sorry: #1792836: Merge HandlerBase::breakPhrase() and HandlerBase::breakPhraseString() and clean up
#5
In general this sounds wrong: 7k arguments to a view, ... can you please have a look at the other issue whether that new regex makes it easier?