Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions Source/JavaScriptCore/interpreter/CallFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,15 @@ CallFrame* CallFrame::callerFrame(EntryFrame*& currEntryFrame) const
SUPPRESS_ASAN CallFrame* CallFrame::unsafeCallerFrame(EntryFrame*& currEntryFrame) const
{
if (unsafeCallerFrameOrEntryFrame() == currEntryFrame) {
// The sampling profiler walks the sampled thread's unsafe state: it can
// start from a stale vm.topCallFrame, or from a machine frame inside
// vmEntryToJavaScript's prologue/epilogue, while its vm.topEntryFrame
// snapshot is null. A walked frame whose caller slot reads null then
// matches the null entry frame here, and vmEntryRecord(nullptr) faults
// reading near address zero. Treat a null entry frame as the end of the
// walk instead.
if (!currEntryFrame)
return nullptr;
VMEntryRecord* currVMEntryRecord = vmEntryRecord(currEntryFrame);
currEntryFrame = currVMEntryRecord->unsafePrevTopEntryFrame();
return currVMEntryRecord->unsafePrevTopCallFrame();
Expand Down
Loading