chakra-core / ChakraCore

ChakraCore is an open source Javascript engine with a C API.
MIT License
9.13k stars 1.2k forks source link

ASSERTION: ChakraCore/lib/Runtime/Types/SimpleTypeHandler.cpp, line 570 #6943

Open anbu1024 opened 1 year ago

anbu1024 commented 1 year ago

ChakraCore version: commit c3ead3f

Build cmd:

./build.sh --debug --static

Test case:

function foo() {

    function bar(v1,v2,v3) {
    }

    function* baz(v5,v6) {
    }

    const a = baz();

    bar.__proto__ = a;

    delete bar.length;

    for (const i in bar) {
        z = v14;
    }

    bar.length = 0;
}

for(let i=0; i<0x300; i++) {
    foo();
}

Execute

./ch --bgjit --oopjit ./test.js

Error msg:

ASSERTION 2624246: (ChakraCore/lib/Runtime/Types/SimpleTypeHandler.cpp, line 570) !GetIsLocked()
 Failure: (!GetIsLocked())
Illegal instruction (core dumped)