You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For rust-lang/rust#135804 I want to make sure the backtrace is always making progress. On most platforms it's enough to check the stack pointer changes. However, on x86 msvc with debuginfo=line-tables-only we also need to check to see if InlineFrameContext changes. Internally we have Frame::inline_context for this. But it's msvc only and not public.
So my idea is to add a public API that looks roughly like this:
/// An opaque struct that can be compared for equality with other stack contexts from the same trace.#[derive(Clone,Eq,PartialEq)]structStackContext{ ... };implFrame{pubfnstack_context(&self) -> Option<StackContext>;}
On most targets StackContext will simply be a wrapper around the stack pointer. But on i686 msvc it'll be the stack pointer plus InlineFrameContext. Users (in this case std) can call frame.stack_context() to determine if the backtrace is stuck by comparing it to the previous StackContext.
The text was updated successfully, but these errors were encountered:
For rust-lang/rust#135804 I want to make sure the backtrace is always making progress. On most platforms it's enough to check the stack pointer changes. However, on x86 msvc with
debuginfo=line-tables-only
we also need to check to see ifInlineFrameContext
changes. Internally we haveFrame::inline_context
for this. But it's msvc only and not public.So my idea is to add a public API that looks roughly like this:
On most targets
StackContext
will simply be a wrapper around the stack pointer. But on i686 msvc it'll be the stack pointer plusInlineFrameContext
. Users (in this case std) can callframe.stack_context()
to determine if the backtrace is stuck by comparing it to the previousStackContext
.The text was updated successfully, but these errors were encountered: