chakra-core / chakra-core/ChakraCore
ERROR: LeakSanitizer: detected memory leaks
- Dominant language
- JavaScript
- Stars
- 9.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Branch: `master`
commit: `c3ead3f8a6e0bb8e32e043adc091c68cba5935e9`
Poc is:
```
var a = [];
for(var i = 0; i < 0xffff*500*10; ++i)
a[i] = i;
```
In release build `./build.sh --sanitize=address --static -j `
I get
```
=================================================================
==59840==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 8 byte(s) in 1 object(s) allocated from:
#0 0x564cfa488b40 in malloc (/home/tangsong/engines/all_version/ChakraCore/ChakraCore-2023-6/sanitize/ch+0x386b40)
#1 0x564cfa89d4bf in char* Memory::HeapAllocator::AllocT(unsigned long) /root/ChakraCore-2023-6/lib/Common/Memory/HeapAllocator.cpp:86:30
#2 0x564cfc3fd3d5 in Memory::HeapAllocator::Alloc(unsigned long) /root/ChakraCore-2023-6/lib/Common/Memory/HeapAllocator.h:153:16
#3 0x564cfc3fd3d5 in Memory::HeapAllocator::AllocZero(unsigned long) /root/ChakraCore-2023-6/lib/Common/Memory/HeapAllocator.h:171
#4 0x564cfc3fd3d5 in void* operator new(unsigned long, Memory::HeapAllocator*, char* (Memory::HeapAllocator::*)(unsigned long)) /root/ChakraCore-2023-6/lib/Common/DataStructures/../Memory/Allocator.h:486
#5 0x564cfc3fd3d5 in NativeCodeGenerator::CodeGen(Memory::PageAllocatorBase, Memory::PageSegmentBase>*, CodeGenWorkItem*, bool) /root/ChakraCore-2023-6/lib/Backend/NativeCodeGenerator.cpp:1133
#6 0x564cfc3fffb4 in NativeCodeGenerator::Process(JsUtil::Job*, JsUtil::ParallelThreadData*) /root/ChakraCore-2023-6/lib/Backend/NativeCodeGenerator.cpp
#7 0x564cfc4464e3 in JsUtil::BackgroundJobProcessor::Process(JsUtil::Job*, JsUtil::ParallelThreadData*) /root/ChakraCore-2023-6/lib/Common/Common/Jobs.cpp:1037:36
#8 0x564cfc446b6d in JsUtil::BackgroundJobProcessor::Run(JsUtil::ParallelThreadData*) /root/ChakraCore-2023-6/lib/Common/Common/Jobs.cpp:1135:44
#9 0x564cfc43fc93 in JsUtil::BackgroundJobProcessor::StaticThreadProc(void*) /root/ChakraCore-2023-6/lib/Common/Common/Jobs.cpp:1319:20
#10 0x564cfa61aadb in CorUnix::CPalThread::ThreadEntry(void*) /root/ChakraCore-2023-6/pal/src/thread/pal_thread.cpp:1554:16
#11 0x564cfa49676e in __asan::AsanThread::ThreadStart(unsigned long, __sanitizer::atomic_uintptr_t*) (/home/tangsong/engines/all_version/ChakraCore/ChakraCore-2023-6/sanitize/ch+0x39476e)
SUMMARY: AddressSanitizer: 8 byte(s) leaked in 1 allocation(s).
```
Contributor guide
Assessment
This issue has not been assessed yet.