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

vm: BigInt intrinsics can take quadratic time without checking for interrupts #47926

Open
rmacnak-google opened this issue Dec 14, 2021 · 1 comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends.

Comments

@rmacnak-google
Copy link
Contributor

rmacnak-google commented Dec 14, 2021

If someone does a BigInt operation in a background isolate, the intrinsified operations can take quadratic time without checking for an interrupt / safepoint request. This can prevent a foreground isolate in the same group from reaching a safepoint and create arbitrarily long pauses.

@rmacnak-google rmacnak-google added the area-vm Use area-vm for VM related issues, including code coverage, FFI, and the AOT and JIT backends. label Dec 14, 2021
@rakudrama
Copy link
Member

One way to avoid the issue is to not use the quadratic code for 'big' problems, e.g. switch to Karatsuba multiplication for bigger products.

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.
Projects
None yet
Development

No branches or pull requests

2 participants