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

Timeout not working with while and .fill() with big number #459

Open
Satont opened this issue Aug 14, 2022 · 0 comments
Open

Timeout not working with while and .fill() with big number #459

Satont opened this issue Aug 14, 2022 · 0 comments

Comments

@Satont
Copy link

Satont commented Aug 14, 2022

import { VM } from 'vm2';
const vm = new VM({
  timeout: 5000,
});
const result = await vm.run(`while (true) {new BigInt64Array(1000000000).fill(100000000n)}`);

This will be runned infinitelly, without any timeouts, and process will use huge amount of ram.

Versions

VM2: 3.9.10
Node: 18.7.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants