Bug 271521 - toLocaleString in JIT
Summary: toLocaleString in JIT
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Local Build
Hardware: PC Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-03-23 06:03 PDT by ujszhangc
Modified: 2024-03-30 06:04 PDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description ujszhangc 2024-03-23 06:03:12 PDT
The following PoC outputs differently before/after JIT compilation.


function opt(opt_param){
function v0(v1,v2) {
    const v7 = [];
    const v6 = JSON.stringify(v7);
    const v8 = v7.__proto__;
    v8[1024] = v6;
    const v9 = v8.sort(); }
const v11 = new Promise(v0,Promise);
const v14 = [,686329.1200909126,,];
const v15 = v14.toLocaleString();
return v15; }
let r1 = opt();
print(r1); //  [],686,329.12,
for(let i =0; i<100; i++){opt();}
let r2 = opt();
print(r2); //  [],686,329.12,[]
Comment 1 Radar WebKit Bug Importer 2024-03-30 06:04:13 PDT
<rdar://problem/125657806>