chakra-core / chakra-core/ChakraCore

Segmentation fault (core dumped) in Js::Type::GetTypeId

Open
#6,938 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
9.3k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

ChakraCore version:
commit c3ead3f8a6e0bb8e32e043adc091c68cba5935e9

Build cmd:
```
./build.sh --debug --static
```

Test case:
```js
function foo() {

async function bar() {
const a = await Function;

const b = [321892086];
const c = delete (321892086)[-3805413367];
b[1] = b;
}

const ret = bar();
return ret;
}

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

top backtrace
```
#0 Js::Type::GetTypeId (this=0x0)
at ChakraCore/lib/Jsrt/../Runtime/Types/Type.h:48
#1 0x00005555558a402d in Js::RecyclableObject::GetTypeId (this=0x7ff7e80022d8)
at ChakraCore/lib/Jsrt/../Runtime/Types/RecyclableObject.inl:13
#2 0x0000555555a83050 in Js::JavascriptOperators::GetTypeId (obj=0x7ff7e80022d8)
at ChakraCore/lib/Runtime/./Language/JavascriptOperators.inl:13
#3 Js::VarIsImpl (obj=0x7ff7e80022d8)
at ChakraCore/lib/Runtime/./Library/JavascriptArray.h:1208
#4 0x0000555555a82f04 in Js::VarIs (aValue=0x7ff7e80022d8)
at ChakraCore/lib/Runtime/./Types/RecyclableObject.h:500
#5 0x0000555555a827f8 in Js::JavascriptOperators::TryFromVar (value=0x7ff7e80022d8)
at ChakraCore/lib/Runtime/./Language/JavascriptOperators.h:256
#6 Js::JavascriptLibrary::CheckAndConvertCopyOnAccessNativeIntArray (instance=0x7ff7e80022d8)
at ChakraCore/lib/Runtime/./Library/JavascriptLibrary.inl:51
#7 0x00005555560373d3 in Js::JavascriptOperators::OP_DeleteElementI (instance=0x7ff7e80022d8, index=0x3e105a3ffee00000, scriptContext=0x555557eeab58, propertyOperationFlags=Js::PropertyOperation_None)
at ChakraCore/lib/Runtime/Language/JavascriptOperators.cpp:5336
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.