Hi all,

after upgrading to v8.5.183 the LeakSanitizer of clang detects a memory 
leak in embedded V8:

==145652==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 12300 byte(s) in 3 object(s) allocated from:
    #0 0x562b902d2ff1 in calloc 
(/home/immanuel/Documents/Work/PhD/mutable/mutable/build/debug/bin/shell+0x11b2ff1)
    #1 0x562b91eb83fe in 
v8::internal::BasicMemoryChunk::Initialize(v8::internal::Heap*, unsigned 
long, unsigned long, unsigned long, unsigned long, v8::internal::Space*, 
v8::internal::VirtualMemory) 
../../../../../third-party/v8/v8/src/heap/basic-memory-chunk.cc:31:42
    #2 0x562b90fe3740 in 
v8::internal::MemoryChunk::Initialize(v8::internal::Heap*, unsigned long, 
unsigned long, unsigned long, unsigned long, v8::internal::Executability, 
v8::internal::Space*, v8::internal::VirtualMemory) 
../../../../../third-party/v8/v8/src/heap/memory-chunk.cc:176:3
    #3 0x562b90fddaa6 in 
v8::internal::MemoryAllocator::AllocateChunk(unsigned long, unsigned long, 
v8::internal::Executability, v8::internal::Space*) 
../../../../../third-party/v8/v8/src/heap/memory-allocator.cc:491:7
    #4 0x562b90fdd5a3 in v8::internal::Page* 
v8::internal::MemoryAllocator::AllocatePage<(v8::internal::MemoryAllocator::AllocationMode)0,
 
v8::internal::PagedSpace>(unsigned long, v8::internal::PagedSpace*, 
v8::internal::Executability) 
../../../../../third-party/v8/v8/src/heap/memory-allocator.cc:617:13
    #5 0x562b91002712 in v8::internal::PagedSpace::Expand() 
../../../../../third-party/v8/v8/src/heap/paged-spaces.cc:336:38
    #6 0x562b91005bcf in 
v8::internal::PagedSpace::RawSlowRefillLinearAllocationArea(int, 
v8::internal::AllocationOrigin) 
../../../../../third-party/v8/v8/src/heap/paged-spaces.cc:974:18
    #7 0x562b910058ba in 
v8::internal::PagedSpace::SlowRefillLinearAllocationArea(int, 
v8::internal::AllocationOrigin) 
../../../../../third-party/v8/v8/src/heap/paged-spaces.cc:902:10
    #8 0x562b90f2ffea in 
v8::internal::PagedSpace::AllocateRawUnaligned(int, 
v8::internal::AllocationOrigin) 
../../../../../third-party/v8/v8/src/heap/paged-spaces-inl.h:98:10
    #9 0x562b90f4e53d in 
v8::internal::Heap::ReserveSpace(std::vector<v8::internal::Heap::Chunk, 
std::allocator<v8::internal::Heap::Chunk> >*, std::vector<unsigned long, 
std::allocator<unsigned long> >*) 
../../../../../third-party/v8/v8/src/heap/heap.cc:1982:46
    #10 0x562b9204daa6 in 
v8::internal::DeserializerAllocator::ReserveSpace() 
../../../../../third-party/v8/v8/src/snapshot/deserializer-allocator.cc:179:31
    #11 0x562b913d5e31 in 
v8::internal::ReadOnlyDeserializer::DeserializeInto(v8::internal::Isolate*) 
../../../../../third-party/v8/v8/src/snapshot/read-only-deserializer.cc:20:21
    #12 0x562b91007f9e in 
v8::internal::ReadOnlyHeap::SetUp(v8::internal::Isolate*, 
v8::internal::ReadOnlyDeserializer*) 
../../../../../third-party/v8/v8/src/heap/read-only-heap.cc:119:8
    #13 0x562b90ec89ee in 
v8::internal::Isolate::Init(v8::internal::ReadOnlyDeserializer*, 
v8::internal::StartupDeserializer*) 
../../../../../third-party/v8/v8/src/execution/isolate.cc:3378:3
    #14 0x562b90ec98ca in 
v8::internal::Isolate::InitWithSnapshot(v8::internal::ReadOnlyDeserializer*, 
v8::internal::StartupDeserializer*) 
../../../../../third-party/v8/v8/src/execution/isolate.cc:3277:10
    #15 0x562b913f4765 in 
v8::internal::Snapshot::Initialize(v8::internal::Isolate*) 
../../../../../third-party/v8/v8/src/snapshot/snapshot.cc:163:16
    #16 0x562b90d8aaff in v8::Isolate::Initialize(v8::Isolate*, 
v8::Isolate::CreateParams const&) 
../../../../../third-party/v8/v8/src/api/api.cc:8242:8
    #17 0x562b90d8b1ae in v8::Isolate::New(v8::Isolate::CreateParams 
const&) ../../../../../third-party/v8/v8/src/api/api.cc:8276:3
    #18 0x562b90513208 in db::V8Platform::V8Platform() 
/home/immanuel/Documents/Work/PhD/mutable/mutable/build/debug/../../src/backend/V8Platform.cpp:198:16
    #19 0x562b9051e429 in std::_MakeUniq<db::V8Platform>::__single_object 
std::make_unique<db::V8Platform>() 
/usr/bin/../lib64/gcc/x86_64-pc-linux-gnu/10.1.0/../../../../include/c++/10.1.0/bits/unique_ptr.h:961:34
    #20 0x562b9051a26b in db::Backend::CreateWasmV8() 
/home/immanuel/Documents/Work/PhD/mutable/mutable/build/debug/../../src/backend/V8Platform.cpp:384:42
    #21 0x562b90436e24 in db::Backend::Create(db::Backend::kind_t) 
/home/immanuel/Documents/Work/PhD/mutable/mutable/build/debug/../../src/tables/Backend.tbl:10:1
    #22 0x562b9032fe6f in db::Backend::Create(char const*) 
/home/immanuel/Documents/Work/PhD/mutable/mutable/build/debug/../../src/backend/Backend.hpp:27:71
    #23 0x562b9030f065 in process_stream(std::istream&, char const*, 
db::Diagnostic) 
/home/immanuel/Documents/Work/PhD/mutable/mutable/build/debug/../../src/shell.cpp:148:32
    #24 0x562b90322319 in main 
/home/immanuel/Documents/Work/PhD/mutable/mutable/build/debug/../../src/shell.cpp:668:13
    #25 0x7f90097ed001 in __libc_start_main (/usr/lib/libc.so.6+0x27001)

SUMMARY: AddressSanitizer: 12300 byte(s) leaked in 3 allocation(s).

What can I do to help solve this?

Regards,
Immanuel

-- 
-- 
v8-users mailing list
v8-users@googlegroups.com
http://groups.google.com/group/v8-users
--- 
You received this message because you are subscribed to the Google Groups 
"v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-users/b01caefd-8bbc-42fa-bce5-247e18028077n%40googlegroups.com.

Reply via email to