chakra-core / chakra-core/ChakraCore
memory leak2
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
# enviroment
ubuntu18
# poc
```
var v0 = ({method : (function* ([{v1}] = []){})});
var v2 = ({deflater : [], inflater : []});
function v3(){
v2.__proto__ = new Proxy(({}), v0);
}
v2 = new v3(v0[0], v2);
v1 = 0;
do {
v1++;
v3();
}while(v1<100000)
```
#asan output
```
=================================================================
==8686==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 8 byte(s) in 1 object(s) allocated from:
#0 0x55ae22f9c3e8 (/root/targets/targets/ch_asan18+0x3e73e8)
#1 0x55ae233d568f (/root/targets/targets/ch_asan18+0x82068f)
#2 0x55ae254af98f (/root/targets/targets/ch_asan18+0x28fa98f)
#3 0x55ae254b2ff5 (/root/targets/targets/ch_asan18+0x28fdff5)
#4 0x55ae2551ffa3 (/root/targets/targets/ch_asan18+0x296afa3)
#5 0x55ae2552092c (/root/targets/targets/ch_asan18+0x296b92c)
#6 0x55ae25519d4c (/root/targets/targets/ch_asan18+0x2964d4c)
#7 0x55ae23183027 (/root/targets/targets/ch_asan18+0x5ce027)
#8 0x7f7da41976da (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
Direct leak of 8 byte(s) in 1 object(s) allocated from:
#0 0x55ae22f9c3e8 (/root/targets/targets/ch_asan18+0x3e73e8)
#1 0x55ae233d568f (/root/targets/targets/ch_asan18+0x82068f)
#2 0x55ae254af98f (/root/targets/targets/ch_asan18+0x28fa98f)
#3 0x55ae254b2faf (/root/targets/targets/ch_asan18+0x28fdfaf)
#4 0x55ae2551ffa3 (/root/targets/targets/ch_asan18+0x296afa3)
#5 0x55ae2552092c (/root/targets/targets/ch_asan18+0x296b92c)
#6 0x55ae25519d4c (/root/targets/targets/ch_asan18+0x2964d4c)
#7 0x55ae23183027 (/root/targets/targets/ch_asan18+0x5ce027)
#8 0x7f7da41976da (/lib/x86_64-linux-gnu/libpthread.so.0+0x76da)
SUMMARY: AddressSanitizer: 16 byte(s) leaked in 2 allocation(s).
```
Contributor guide
Research direction
Start by reproducing the JavaScript POC on Ubuntu 18 with an AddressSanitizer build and compare its leak report. The payload provides no source file or test location, so trace the reported allocation stack through ChakraCore to identify the leaked objects. Done means the reproducer no longer reports the two allocations as leaks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100