Skip to content

gh16947: avoid mutating regexp program only within GOSUB #17736

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

Closed
wants to merge 1 commit into from
Closed

Conversation

hvds
Copy link
Contributor

@hvds hvds commented Apr 21, 2020

Commits 3bc2a78 and bdb91f3 used the existence of a frame to
decide when it was unsafe to mutate the regexp program, due to having
recursed for as GOSUB. However the frame recursion mechanism is also
used for SUSPEND.

Refine it further to avoid mutation only when within a GOSUB by saving
a new boolean in the frame structure, and using that to derive a "mutate_ok"
flag.

Commits 3bc2a78 and bdb91f3 used the existence of a frame to
decide when it was unsafe to mutate the regexp program, due to having
recursed for as GOSUB. However the frame recursion mechanism is also
used for SUSPEND.

Refine it further to avoid mutation only when within a GOSUB by saving
a new boolean in the frame structure, and using that to derive a "mutate_ok"
flag.
@hvds
Copy link
Contributor Author

hvds commented Apr 23, 2020

Now merged.

@hvds hvds closed this Apr 23, 2020
@hvds hvds deleted the gh16947-3 branch September 16, 2020 11:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants