WasmCompiledFrame::Print is called from FatalProcessOutOfMemory, so it should not allocate neither on the C++ heap, nor on the JS heap.
We currently allocate on the JS heap, which fails because heap allocations are disallowed via DisallowHeapAllocationScope in Isolate::PrintStack:
#
# Fatal error in ../../v8/src/heap/heap-inl.h, line 137
# Debug check failed: AllowHeapAllocation::IsAllowed().
#
#
#
#FailureMessage Object: 0x7f72f6001bd0#0 0x7f733bcf67bd base::debug::StackTrace::StackTrace()
#1 0x7f733b9f3a2a base::debug::StackTrace::StackTrace()
#2 0x7f731f06bb67 gin::(anonymous namespace)::PrintStackTrace()
#3 0x7f7306ad1098 V8_Fatal()
#4 0x7f7306ad0e05 v8::base::(anonymous namespace)::DefaultDcheckHandler()
#5 0x7f731e499df4 v8::internal::Heap::AllocateRaw()
#6 0x7f731e4da72f v8::internal::Heap::AllocateRawWithLightRetry()
#7 0x7f731e4da80f v8::internal::Heap::AllocateRawWithRetryOrFail()
#8 0x7f731e4a41e6 v8::internal::Factory::NewByteArray()
#9 0x7f731ea0da87 v8::internal::WasmModuleObject::GetSourcePosition()
#10 0x7f731e48396e v8::internal::WasmCompiledFrame::Print()
#11 0x7f731e5db3b1 v8::internal::Isolate::PrintStack()
#12 0x7f731e4d9bcd v8::internal::Heap::RecordStats()
#13 0x7f731df755de v8::internal::V8::FatalProcessOutOfMemory()
#14 0x7f731e4d0972 v8::internal::Heap::FatalProcessOutOfMemory()
#15 0x7f731e497626 v8::internal::Factory::NewFixedArrayWithFiller()
#16 0x7f731e40a269 v8::internal::(anonymous namespace)::ElementsAccessorBase<>::GrowCapacity()
#17 0x7f731e7f182f v8::internal::__RT_impl_Runtime_GrowArrayElements()
#18 0x7f731edd4e75 <unknown>