Skip to content

PY: revert group sequences of chars #12514

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

erik-krogh
Copy link
Contributor

@erik-krogh erik-krogh commented Mar 14, 2023

THIS PR IS FOR NOTE-TAKING AND DISCUSSION, NOT FOR MERGING (yet)

This is a partial revert of https://github.com/github/codeql/pull/8166/files

I've updated the test-output to reflect the new results we gain from this revert.

This only touches Python, but Ruby/Java is also relevant.

CVE-2017-18361: TP
(Other security issue): TP (with constant-folding).

@erik-krogh erik-krogh added the WIP This is a work-in-progress, do not merge yet! label Mar 14, 2023
@aibaars
Copy link
Contributor

aibaars commented Mar 14, 2023

If I remember correctly the purpose of the change that gets reverted in this PR is to reduce the number of regex AST nodes by grouping sequences of normal characters into a single node instead of separate nodes for each character. Without this I think there is a risk of performance degradation for large strings (that may not even be actual regular expressions).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python WIP This is a work-in-progress, do not merge yet!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants