-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPCC-30735 Check regular expressions are valid at compile time #17995
Conversation
https://track.hpccsystems.com/browse/HPCC-30735 |
Caught one pre-existing example in ecl/regress/jholt10.ecl. |
ecl/regress/badregexfind.ecl
Outdated
limitations under the License. | ||
############################################################################## */ | ||
|
||
string searchString := '' : stored('searchSting'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: stored('searchString')
ecl/regress/badregexfind2.ecl
Outdated
limitations under the License. | ||
############################################################################## */ | ||
|
||
string searchString := '' : stored('searchSting'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor: stored('searchString')
//Most regexes will have been checked in the parser, but not if it is the result of a constant fold. | ||
//Check again because an error thrown in a static constructor of a dynamically loaded dll can cause | ||
//the process to abort HPCC-30735 | ||
Owned<IException> e = checkRegexSyntax(pattern); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is checked here, is it necessary to check it in the parser too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, because in the parser it will report an error that directly links to the line with the problem. Here it is unlikely to have any indication where the problem is.
Signed-off-by: Gavin Halliday <[email protected]>
Fixed and squashed. |
7fff663
into
hpcc-systems:candidate-9.4.x
Type of change:
Checklist:
Smoketest:
Testing: