Skip to content
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

[CP] Fix crash when isolates shares and use one RegEx concurrently #51130

Closed
aam opened this issue Jan 25, 2023 · 3 comments
Closed

[CP] Fix crash when isolates shares and use one RegEx concurrently #51130

aam opened this issue Jan 25, 2023 · 3 comments
Assignees
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. cherry-pick-approved Label for approved cherrypick request merge-to-stable

Comments

@aam
Copy link
Contributor

aam commented Jan 25, 2023

Commit(s) to merge

438b81c, 4275d59

Target

both

Prepared changelist for beta/stable

https://dart-review.googlesource.com/c/sdk/+/279747

Issue Description

RegEx runtime execution state was incorrectly shared between isolates, which resulted in one isolate potentially affecting another by overwriting currently running RegEx execution state(backtracking stack, etc). If one has long running RegEx, that probability of a crash increases significantly.

What is the fix

First commit disables sharing of RegEx completely, fixing the crash, but regressing the performance of sending RegEx across isolates.
Second commit restored fast RegEx sharing, making sure that runtime state(backtracking stack and others) are kept local to every isolate.

Why cherry-pick

The fix missed the window for 2.19.0, users would like the fix to be available on stable.

Risk

medium

Issue link(s)

#50082

Extra Info

No response

@aam aam added the cherry-pick-review Issue that need cherry pick triage to approve label Jan 25, 2023
@a-siva
Copy link
Contributor

a-siva commented Jan 26, 2023

lgtm, the customer would like to have this fixed in a stable version.

@a-siva a-siva added the area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. label Jan 26, 2023
@itsjustkevin itsjustkevin added merge-to-stable cherry-pick-approved Label for approved cherrypick request labels Jan 30, 2023
@athomas athomas removed the cherry-pick-review Issue that need cherry pick triage to approve label Jan 30, 2023
@sortie
Copy link
Contributor

sortie commented Feb 2, 2023

Released in 2.19.1.

@sortie sortie closed this as completed Feb 2, 2023
@Cat-sushi
Copy link

I confirmed this issue is fixed at 2.19.1.
Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. cherry-pick-approved Label for approved cherrypick request merge-to-stable
Projects
None yet
Development

No branches or pull requests

9 participants