OS: ubuntu20.04 Architecture: <x64> ./jsc --useConcurrentJIT=false --thresholdForOptimizeAfterWarmUp=50 bug.js expected output undefined undefined actual output undefined NaN bug.js ################################## function opt() { const v1 = [Infinity]; const v2 = v1[4096]; new Promise(Promise); return v2; } print(opt()); for (let i = 0; i < 0x1000; i++) { opt(); } print(opt());
<rdar://problem/85760649>