-
Notifications
You must be signed in to change notification settings - Fork 307
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-33349 Roxie crash loading pre-9.8 queries with invalid regex #19480
base: candidate-9.8.x
Are you sure you want to change the base?
HPCC-33349 Roxie crash loading pre-9.8 queries with invalid regex #19480
Conversation
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-33349 Jirabot Action Result: |
The basic idea of the changes in this PR are:
|
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.
@dcamper thanks, the change looks good.
I have added one comment for a suggestion of a different implementation, but I am inclined to merge as-is since that has been tested. Are you happy with that?
{ | ||
compiledRegex = std::shared_ptr<pcre2_code_8>(compileRegex(_regexLength, _regex, _isCaseSensitive, _enableUTF8), pcre2_code_free_8); | ||
} | ||
catch (IException *e) |
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.
One alternative implementation suggestion. You could have an Owned<IException> savedException
member.
catch (IException * e)
{
savedExceptions.setown(e);
}
and
if (savedException)
throw savedException.getLink();
@ghalliday Saving exception rather than error description, as that is more in-line with platform style. Please recheck. Thanks! |
Type of change:
Checklist:
Smoketest:
Testing:
Manually: Publish a query with a known-bad regex pattern to a 9.6.x cluster. Upgrade the cluster to 9.8.x. Ensure that Roxie does not crash and the query emits the correct error messages for the regex pattern failure.