proton icon indicating copy to clipboard operation
proton copied to clipboard

Fix x64 memoy sanitizer build

Open yokofly opened this issue 2 years ago • 21 comments

Describe what's wrong https://github.com/timeplus-io/proton/actions/runs/6447033445/job/17502902310#step:7:11491

Oct 08 10:54:20 FAILED: contrib/v8-cmake/embedded.S contrib/v8-cmake/snapshot.cc /build/build_docker/contrib/v8-cmake/embedded.S /build/build_docker/contrib/v8-cmake/snapshot.cc 
Oct 08 10:54:20 cd /build/build_docker/contrib/v8-cmake && /build/build_docker/contrib/v8-cmake/mksnapshot --embedded_src /build/build_docker/contrib/v8-cmake/embedded.S --startup_src /build/build_docker/contrib/v8-cmake/snapshot.cc --target_arch=x64  --target_os=linux  --turbo_instruction_scheduling
Oct 08 10:54:20 ==31966==WARNING: MemorySanitizer: use-of-uninitialized-value
Oct 08 10:54:20     #0 0x13d5a98 in long std::__1::atomic_load_explicit[abi:v15000]<long>(std::__1::atomic<long> const volatile*, std::__1::memory_order) build_docker/../contrib/llvm-project/libcxx/include/atomic:1963:5
Oct 08 10:54:20     #1 0x21e1ae9 in v8::base::Acquire_Load(long const volatile*) build_docker/../contrib/v8-cmake/v8/src/base/atomicops.h:336:10
Oct 08 10:54:20     #2 0x21e1ae9 in unsigned long v8::base::AsAtomicImpl<long>::Acquire_Load<unsigned long>(unsigned long*) build_docker/../contrib/v8-cmake/v8/src/base/atomic-utils.h:80:9
Oct 08 10:54:20     #3 0x21e1ae9 in v8::internal::FullObjectSlot::Acquire_Load() const build_docker/../contrib/v8-cmake/v8/src/objects/slots-inl.h:61:17
Oct 08 10:54:20     #4 0x21e1ae9 in v8::internal::FullObjectSlot::Acquire_Load(v8::internal::PtrComprCageBase) const build_docker/../contrib/v8-cmake/v8/src/objects/slots-inl.h:65:10
Oct 08 10:54:20     #5 0x21e1ae9 in v8::internal::StringTable::Data::Get(v8::internal::PtrComprCageBase, v8::internal::InternalIndex) const build_docker/../contrib/v8-cmake/v8/src/objects/string-table.cc:102:24
Oct 08 10:54:20     #6 0x21e1ae9 in v8::internal::InternalIndex v8::internal::StringTable::Data::FindEntry<v8::internal::Isolate, v8::internal::SequentialStringKey<unsigned char>>(v8::internal::Isolate*, v8::internal::SequentialStringKey<unsigned char>*, unsigned int) const build_docker/../contrib/v8-cmake/v8/src/objects/string-table.cc:262:22
Oct 08 10:54:20     #7 0x21e1ae9 in v8::internal::Handle<v8::internal::String> v8::internal::StringTable::LookupKey<v8::internal::SequentialStringKey<unsigned char>, v8::internal::Isolate>(v8::internal::Isolate*, v8::internal::SequentialStringKey<unsigned char>*) build_docker/../contrib/v8-cmake/v8/src/objects/string-table.cc:598:39
Oct 08 10:54:20     #8 0x1adca85 in v8::internal::Handle<v8::internal::String> v8::internal::FactoryBase<v8::internal::Factory>::InternalizeStringWithKey<v8::internal::SequentialStringKey<unsigned char>>(v8::internal::SequentialStringKey<unsigned char>*) build_docker/../contrib/v8-cmake/v8/src/heap/factory-base.cc:611:37
Oct 08 10:54:20     #9 0x1adca85 in v8::internal::FactoryBase<v8::internal::Factory>::InternalizeString(v8::base::Vector<unsigned char const>, bool) build_docker/../contrib/v8-cmake/v8/src/heap/factory-base.cc:639:10
Oct 08 10:54:20     #10 0x1af7e5e in v8::internal::Factory::InternalizeUtf8String(v8::base::Vector<char const>) build_docker/../contrib/v8-cmake/v8/src/heap/factory.cc:678:34
Oct 08 10:54:20     #11 0x1d0afc7 in v8::internal::Factory::InternalizeUtf8String(char const*) build_docker/../contrib/v8-cmake/v8/src/heap/factory.h:215:12
Oct 08 10:54:20     #12 0x1d0afc7 in v8::internal::Heap::CreateImportantReadOnlyObjects() build_docker/../contrib/v8-cmake/v8/src/heap/setup-heap-internal.cc:716:35
Oct 08 10:54:20     #13 0x1d078a1 in v8::internal::Heap::CreateReadOnlyHeapObjects() build_docker/../contrib/v8-cmake/v8/src/heap/setup-heap-internal.cc:177:8
Oct 08 10:54:20     #14 0x1d078a1 in v8::internal::SetupIsolateDelegate::SetupHeapInternal(v8::internal::Isolate*) build_docker/../contrib/v8-cmake/v8/src/heap/setup-heap-internal.cc:159:16
Oct 08 10:54:20     #15 0x138c28f in v8::internal::SetupIsolateDelegate::SetupHeap(v8::internal::Isolate*, bool) build_docker/../contrib/v8-cmake/v8/src/init/setup-isolate-full.cc:20:10
Oct 08 10:54:20     #16 0x1a35876 in v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) build_docker/../contrib/v8-cmake/v8/src/execution/isolate.cc:4482:25
Oct 08 10:54:20     #17 0x1a34791 in v8::internal::Isolate::InitWithoutSnapshot() build_docker/../contrib/v8-cmake/v8/src/execution/isolate.cc:4069:10
Oct 08 10:54:20     #18 0x140c536 in v8::SnapshotCreator::SnapshotCreator(v8::Isolate*, long const*, v8::StartupData const*, bool) build_docker/../contrib/v8-cmake/v8/src/api/api.cc:582:16
Oct 08 10:54:20     #19 0x2488450 in v8::internal::CreateSnapshotDataBlobInternal(v8::SnapshotCreator::FunctionCodeHandling, char const*, v8::Isolate*) build_docker/../contrib/v8-cmake/v8/src/snapshot/snapshot.cc:774:23
Oct 08 10:54:20     #20 0x1396795 in (anonymous namespace)::CreateSnapshotDataBlob(v8::Isolate*, char const*) build_docker/../contrib/v8-cmake/v8/src/snapshot/mksnapshot.cc:161:28
Oct 08 10:54:20     #21 0x1396795 in main build_docker/../contrib/v8-cmake/v8/src/snapshot/mksnapshot.cc:286:14
Oct 08 10:54:20     #22 0x7f9390066082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
Oct 08 10:54:20     #23 0x1302f8d in _start (/build/build_docker/contrib/v8-cmake/mksnapshot+0x1302f8d) (BuildId: 1675e3ed4c24396b5015fcef2d3002159fab6f4d)
Oct 08 10:54:20 
Oct 08 10:54:20   Uninitialized value was created by a heap allocation
Oct 08 10:54:20     #0 0x132fcc3 in posix_memalign (/build/build_docker/contrib/v8-cmake/mksnapshot+0x132fcc3) (BuildId: 1675e3ed4c24396b5015fcef2d3002159fab6f4d)
Oct 08 10:54:20     #1 0x24ba3d0 in v8::base::AlignedAlloc(unsigned long, unsigned long) build_docker/../contrib/v8-cmake/v8/src/base/platform/memory.h:90:7
Oct 08 10:54:20     #2 0x24ba3d0 in v8::internal::AlignedAllocWithRetry(unsigned long, unsigned long) build_docker/../contrib/v8-cmake/v8/src/utils/allocation.cc:145:14
Oct 08 10:54:20     #3 0x21e04fd in v8::internal::StringTable::Data::operator new(unsigned long, int) build_docker/../contrib/v8-cmake/v8/src/objects/string-table.cc:200:10
Oct 08 10:54:20     #4 0x21e04fd in v8::internal::StringTable::Data::New(int) build_docker/../contrib/v8-cmake/v8/src/objects/string-table.cc:224:32
Oct 08 10:54:20     #5 0x21e04fd in v8::internal::StringTable::StringTable(v8::internal::Isolate*) build_docker/../contrib/v8-cmake/v8/src/objects/string-table.cc:330:13
Oct 08 10:54:20     #6 0x1a438f2 in v8::internal::StringTable* std::__1::construct_at[abi:v15000]<v8::internal::StringTable, v8::internal::Isolate*, v8::internal::StringTable*>(v8::internal::StringTable*, v8::internal::Isolate*&&) build_docker/../contrib/llvm-project/libcxx/include/__memory/construct_at.h:35:48
Oct 08 10:54:20     #7 0x1a438f2 in void std::__1::allocator_traits<std::__1::allocator<v8::internal::StringTable>>::construct[abi:v15000]<v8::internal::StringTable, v8::internal::Isolate*, void, void>(std::__1::allocator<v8::internal::StringTable>&, v8::internal::StringTable*, v8::internal::Isolate*&&) build_docker/../contrib/llvm-project/libcxx/include/__memory/allocator_traits.h:298:9
Oct 08 10:54:20     #8 0x1a438f2 in std::__1::__shared_ptr_emplace<v8::internal::StringTable, std::__1::allocator<v8::internal::StringTable>>::__shared_ptr_emplace[abi:v15000]<v8::internal::Isolate*>(std::__1::allocator<v8::internal::StringTable>, v8::internal::Isolate*&&) build_docker/../contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:292:9
Oct 08 10:54:20     #9 0x1a438f2 in std::__1::shared_ptr<v8::internal::StringTable> std::__1::allocate_shared[abi:v15000]<v8::internal::StringTable, std::__1::allocator<v8::internal::StringTable>, v8::internal::Isolate*, void>(std::__1::allocator<v8::internal::StringTable> const&, v8::internal::Isolate*&&) build_docker/../contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:953:55
Oct 08 10:54:20     #10 0x1a438f2 in std::__1::shared_ptr<v8::internal::StringTable> std::__1::make_shared[abi:v15000]<v8::internal::StringTable, v8::internal::Isolate*, void>(v8::internal::Isolate*&&) build_docker/../contrib/llvm-project/libcxx/include/__memory/shared_ptr.h:962:12
Oct 08 10:54:20     #11 0x1a35770 in v8::internal::Isolate::Init(v8::internal::SnapshotData*, v8::internal::SnapshotData*, v8::internal::SnapshotData*, bool) build_docker/../contrib/v8-cmake/v8/src/execution/isolate.cc:4413:21
Oct 08 10:54:20     #12 0x1a34791 in v8::internal::Isolate::InitWithoutSnapshot() build_docker/../contrib/v8-cmake/v8/src/execution/isolate.cc:4069:10
Oct 08 10:54:20     #13 0x140c536 in v8::SnapshotCreator::SnapshotCreator(v8::Isolate*, long const*, v8::StartupData const*, bool) build_docker/../contrib/v8-cmake/v8/src/api/api.cc:582:16
Oct 08 10:54:20     #14 0x2488450 in v8::internal::CreateSnapshotDataBlobInternal(v8::SnapshotCreator::FunctionCodeHandling, char const*, v8::Isolate*) build_docker/../contrib/v8-cmake/v8/src/snapshot/snapshot.cc:774:23
Oct 08 10:54:20     #15 0x1396795 in (anonymous namespace)::CreateSnapshotDataBlob(v8::Isolate*, char const*) build_docker/../contrib/v8-cmake/v8/src/snapshot/mksnapshot.cc:161:28
Oct 08 10:54:20     #16 0x1396795 in main build_docker/../contrib/v8-cmake/v8/src/snapshot/mksnapshot.cc:286:14
Oct 08 10:54:20     #17 0x7f9390066082 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x24082) (BuildId: 1878e6b475720c7c51969e69ab2d276fae6d1dee)
Oct 08 10:54:20 
Oct 08 10:54:20 SUMMARY: MemorySanitizer: use-of-uninitialized-value build_docker/../contrib/llvm-project/libcxx/include/atomic:1963:5 in long std::__1::atomic_load_explicit[abi:v15000]<long>(std::__1::atomic<long> const volatile*, std::__1::memory_order)

How to reproduce

Error message and/or stacktrace

Additional context

yokofly avatar Oct 09 '23 02:10 yokofly

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Oct 27 '23 18:10 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Nov 10 '23 17:11 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Nov 24 '23 15:11 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Dec 08 '23 18:12 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Dec 22 '23 22:12 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Jan 05 '24 16:01 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Jan 19 '24 19:01 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Feb 02 '24 21:02 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Feb 16 '24 22:02 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Mar 01 '24 19:03 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Mar 15 '24 14:03 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Mar 31 '24 16:03 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Apr 12 '24 04:04 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Apr 26 '24 20:04 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar May 10 '24 20:05 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar May 24 '24 16:05 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Jun 07 '24 14:06 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Jun 21 '24 06:06 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Jul 05 '24 09:07 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Jul 19 '24 02:07 jovezhong

(Jove Github Bot) assuming it is not done, deferred this ticket to the next sprint.

jovezhong avatar Aug 02 '24 21:08 jovezhong