vm2
vm2 copied to clipboard
Timeout not working with `while` and `.fill()` with big number
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