Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Valgrind: cppgc "Conditional jump or move depends on uninitialised value(s)" #691

Open
mmastrac opened this issue Apr 9, 2024 · 0 comments

Comments

@mmastrac
Copy link
Contributor

mmastrac commented Apr 9, 2024

Valgrind reports that we're somehow depending on uninitialized values in v8's cppgc heap. Reproducible by running unit tests directly in valgrind.


==3963== 160 errors in context 8 of 10:
==3963== Conditional jump or move depends on uninitialised value(s)
==3963==    at 0x3311FDF: cppgc::internal::ConservativeTracingVisitor::TraceConservativelyIfNeeded(void const*)::$_0::operator()(unsigned char*) const (visitor.cc:94)
==3963==    by 0x2CD9821: v8::internal::(anonymous namespace)::UnifiedHeapConservativeMarkingVisitor::TraceConservativelyIfNeeded(void const*) (cpp-heap.cc:260)
==3963==    by 0x3314319: heap::base::(anonymous namespace)::IteratePointersInStack(heap::base::StackVisitor*, void const*, void const*, void const*) (stack.cc:137)
==3963==    by 0x3314360: heap::base::Stack::IteratePointersUntilMarker(heap::base::StackVisitor*) const (stack.cc:189)
==3963==    by 0x3304AF8: cppgc::internal::MarkerBase::VisitRoots(cppgc::EmbedderStackState) (marker.cc:483)
==3963==    by 0x3304DE9: cppgc::internal::MarkerBase::EnterAtomicPause(cppgc::EmbedderStackState) (marker.cc:294)
==3963==    by 0x2CD8A8D: v8::internal::CppHeap::EnterFinalPause(cppgc::EmbedderStackState) (cpp-heap.cc:821)
==3963==    by 0x2D5E357: v8::internal::MarkCompactCollector::MarkLiveObjects() (mark-compact.cc:2425)
==3963==    by 0x2D5DFCD: v8::internal::MarkCompactCollector::CollectGarbage() (mark-compact.cc:409)
==3963==    by 0x2D14F18: v8::internal::Heap::MarkCompact() (heap.cc:2695)
==3963==    by 0x2D14628: v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) (heap.cc:2381)
==3963==    by 0x2D25B9C: v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1::operator()() const (heap.cc:1865)
==3963== 
==3963== 
==3963== 160 errors in context 9 of 10:
==3963== Conditional jump or move depends on uninitialised value(s)
==3963==    at 0x3311FDF: cppgc::internal::ConservativeTracingVisitor::TraceConservativelyIfNeeded(void const*)::$_0::operator()(unsigned char*) const (visitor.cc:94)
==3963==    by 0x3311E5E: cppgc::internal::ConservativeTracingVisitor::TraceConservativelyIfNeeded(void const*) (visitor.cc:106)
==3963==    by 0x2CD9821: v8::internal::(anonymous namespace)::UnifiedHeapConservativeMarkingVisitor::TraceConservativelyIfNeeded(void const*) (cpp-heap.cc:260)
==3963==    by 0x3314319: heap::base::(anonymous namespace)::IteratePointersInStack(heap::base::StackVisitor*, void const*, void const*, void const*) (stack.cc:137)
==3963==    by 0x3314360: heap::base::Stack::IteratePointersUntilMarker(heap::base::StackVisitor*) const (stack.cc:189)
==3963==    by 0x3304AF8: cppgc::internal::MarkerBase::VisitRoots(cppgc::EmbedderStackState) (marker.cc:483)
==3963==    by 0x3304DE9: cppgc::internal::MarkerBase::EnterAtomicPause(cppgc::EmbedderStackState) (marker.cc:294)
==3963==    by 0x2CD8A8D: v8::internal::CppHeap::EnterFinalPause(cppgc::EmbedderStackState) (cpp-heap.cc:821)
==3963==    by 0x2D5E357: v8::internal::MarkCompactCollector::MarkLiveObjects() (mark-compact.cc:2425)
==3963==    by 0x2D5DFCD: v8::internal::MarkCompactCollector::CollectGarbage() (mark-compact.cc:409)
==3963==    by 0x2D14F18: v8::internal::Heap::MarkCompact() (heap.cc:2695)
==3963==    by 0x2D14628: v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) (heap.cc:2381)
==3963== 
==3963== 
==3963== 250 errors in context 10 of 10:
==3963== Conditional jump or move depends on uninitialised value(s)
==3963==    at 0x331430F: heap::base::(anonymous namespace)::IteratePointersInStack(heap::base::StackVisitor*, void const*, void const*, void const*) (stack.cc:136)
==3963==    by 0x3314360: heap::base::Stack::IteratePointersUntilMarker(heap::base::StackVisitor*) const (stack.cc:189)
==3963==    by 0x3304AF8: cppgc::internal::MarkerBase::VisitRoots(cppgc::EmbedderStackState) (marker.cc:483)
==3963==    by 0x3304DE9: cppgc::internal::MarkerBase::EnterAtomicPause(cppgc::EmbedderStackState) (marker.cc:294)
==3963==    by 0x2CD8A8D: v8::internal::CppHeap::EnterFinalPause(cppgc::EmbedderStackState) (cpp-heap.cc:821)
==3963==    by 0x2D5E357: v8::internal::MarkCompactCollector::MarkLiveObjects() (mark-compact.cc:2425)
==3963==    by 0x2D5DFCD: v8::internal::MarkCompactCollector::CollectGarbage() (mark-compact.cc:409)
==3963==    by 0x2D14F18: v8::internal::Heap::MarkCompact() (heap.cc:2695)
==3963==    by 0x2D14628: v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::internal::GarbageCollectionReason, char const*) (heap.cc:2381)
==3963==    by 0x2D25B9C: v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1::operator()() const (heap.cc:1865)
==3963==    by 0x2D256F4: void heap::base::Stack::SetMarkerAndCallbackImpl<v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags)::$_1>(heap::base::Stack*, void*, void const*) (stack.h:95)
==3963==    by 0x331442A: ??? (in /mnt/deno2)
==3963== 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant