Hey Dan,

thanks for the quick reply. I figured that this is related to pointer 
compression. I *enabled* pointer compression and the leak is gone.  

Regards,
Immanuel
delp...@chromium.org schrieb am Mittwoch, 17. Juni 2020 um 15:03:25 UTC+2:

> Thanks for the report. This may be a bogus report (in that the memory 
> isn't actually leaked) because we use mmap to allocate our memory for 
> MemoryChunks, which means LeakSanitiser doesn't see that there is a 
> connection to the memory pointed to by the MemoryChunk. Alternatively I've 
> created a real leak and this needs addressing.
>
> I'm actively working on this code right now and will take a look at it. It 
> looks like it's related to read-only space sharing which is disabled by 
> pointer compression (which you in turn have disabled), which is probably 
> why our bots missed it.
>
> Thanks,
> Dan
>
> On Wed, 17 Jun 2020 at 13:46, Immanuel Haffner <haffner....@gmail.com> 
> wrote:
>
>> I create an instance with
>>
>>     v8::Isolate::CreateParams create_params;
>>     create_params.array_buffer_allocator = allocator_ = 
>> v8::ArrayBuffer::Allocator::NewDefaultAllocator();
>>     isolate_ = v8::Isolate::New(create_params);
>>
>> and dispose of it with
>>
>>     isolate_->Dispose();
>>     delete allocator_;
>>
>>
>> Immanuel Haffner schrieb am Mittwoch, 17. Juni 2020 um 14:44:33 UTC+2:
>>
>>> Build args are
>>>
>>> is_clang=true is_component_build=false v8_monolithic=true 
>>> v8_enable_pointer_compression=false treat_warnings_as_errors=false 
>>> v8_use_external_startup_data=false use_sysroot=false 
>>> use_custom_libcxx=false clang_use_chrome_plugins=false 
>>> target_cpu="x64" is_debug=true use_debug_fission=true
>>>
>>> Immanuel Haffner schrieb am Mittwoch, 17. Juni 2020 um 14:43:51 UTC+2:
>>>
>>>> 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-u...@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+u...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/v8-users/cb7db6f0-7aa9-4303-9e6c-82eed0605e4an%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/v8-users/cb7db6f0-7aa9-4303-9e6c-82eed0605e4an%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
-- 
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/a5d1fe1d-75ef-482d-b518-ede65c4c9244n%40googlegroups.com.

Reply via email to