chakra-core / ChakraCore

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

ASSERTION 444087: (ChakraCore/lib/Backend/LinearScan.cpp, line 3412) #6946

Open anbu1024 opened 9 months ago

anbu1024 commented 9 months ago

ChakraCore version: commit c3ead3f

Build cmd:

./build.sh --debug --static

Test case:

function foo()
{
    function bar(arg) {
        switch (bar) {
            case arg:
                break;
            default:
                let i = 65537;
                while (i == i) {
                    i += "1";
                    i--;
                }
                break;
        }
    }
    const m = 0;
    const n = bar(m);
    const z = n || 9223372036854775806;
    return z;
}

let i = 0;
while(i < 1024)
{
    foo();
    i++;
}

Execute

./ch ./test.js

Error msg:

ASSERTION 444087: (ChakraCore/lib/Backend/LinearScan.cpp, line 3412) lifetime->start < instr->GetNumber() && lifetime->end >= instr->GetNumber()
 Failure: (lifetime->start < instr->GetNumber() && lifetime->end >= instr->GetNumber())
Illegal instruction (core dumped)