Questions tagged [stack-unwinding]

Stack-unwind will pop the top frame of the stack, depending on the language it may occur e.g. at the end of a code block, when returning from a called function, or during exception handling.

Stack-unwind will pop the top frame of the stack. Depending on the language this may occur e.g. at the end of a code block, when returning from a called function, or during exception handling.

Related tags: .

Related Q/A:

References:

128 questions
2
votes
2 answers

Can I disable the "Unable to read dynamic function table entry" message in WinDbg?

I'm working with a program that generates a lot of code at runtime, and seems not to produce any unwind data for it. (I don't have source code for this program; I'm writing a plugin for it.) When the program hangs, I break into it with WinDbg, and…
Tom Seddon
  • 2,648
  • 1
  • 19
  • 28
2
votes
3 answers

iOS unwind to view not loaded

I'm in front of a little problem : I have something like that when launching the app : (1) Splash view --> I am logged ? --> (3) HomeView | else (2) Login view So when I log, then I go to the home view. And when I logout, I can unwind to the login…
Aymenworks
  • 423
  • 7
  • 21
2
votes
2 answers

How to get line number from libunwind and AddressSanitizer listed as +offset?

I often get stack traces from libunwind or AddressSanitizer like this: #12 0x7ffff4b47063 (/home/janw/src/pl-devel/lib/x86_64-linux/libswipl.so.7.1.13+0x1f5063) #13 0x7ffff4b2c783…
Jan Wielemaker
  • 1,670
  • 10
  • 18
2
votes
11 answers

Program crashes when leaving a c++ function....What do you think it is?

I have a c++ code, I use MSC9 to compile it. It keeps crashing randomly. For example it crashes if it is called from Perl using `` but it does not crash when It is called from command line or from Ultimate++. I mean calling it from perl eg. f.exe…
Aftershock
  • 5,205
  • 4
  • 51
  • 64
1
vote
1 answer

.eh_frame vs .debug_frame section?

The .debug_frame section seems to contain stack unwinding information and is defined by the dwarf standard. The .eh_frame section seems to basically contain the same information with some subtle differences and is defined by the linux…
Fee
  • 719
  • 9
  • 24
1
vote
1 answer

What is the machinery behind stack unwinding?

I'm trying to understand the machinery behind stack unwinding in C++. In other words I'm interested in how this feature is implemented (and whether that is a part of the standard). So, the thread executes some code until an exception is thrown. When…
Dmitry Kuzminov
  • 6,180
  • 6
  • 18
  • 40
1
vote
1 answer

Converting an prel31 address to the actual address from an .ARM.exidx section

I want to learn about ARM stack unwinding and for this reason, I took a closer look into the .ARM.exidx section of my binary. The binary was build using gcc for arm, little endian, for an Cortex M0 32bit. As expected, I got the exidx table, here is…
Essometer
  • 77
  • 10
1
vote
0 answers

how dwarf format caculate provious sp pointer

this is example is from dwarf document. How Can I caculate provious sp(r7) pointer,I mean It didnot save sp somewhere since sp is a callee-save register. The architectural ABI committee specifies that the stack pointer (R7) is the same as the…
radong
  • 29
  • 2
1
vote
2 answers

Does std::move leave stack fragmented or is the stack rearranged after moving an object to the caller?

I have read several answers and and many articles about move semantic so it is simply a static cast to rvalue reference, this question is about its influence on the stack, so is the stack left fragmanted after move? or is it rearranged somehow? as…
muaz
  • 550
  • 9
  • 15
1
vote
1 answer

How to detect stack unwinding in C++20 coroutines?

The typical advice in C++ is to detect stack unwinding in the destructor using std::uncaught_exceptions(), see the example from https://en.cppreference.com/w/cpp/error/uncaught_exception : struct Foo { int count = std::uncaught_exceptions(); …
Fedor
  • 17,146
  • 13
  • 40
  • 131
1
vote
1 answer

perf record with --call-stack fp fails to unwind main function

I have a C++ test program that keeps the CPU busy: #include #include // Linear-feedback shift register uint64_t lfsr1(uint64_t max_ix) { uint64_t start_state = 0xACE1u; /* Any nonzero start state will work. */ uint64_t…
nnnmmm
  • 7,964
  • 4
  • 22
  • 41
1
vote
2 answers

How to see result of MASM directives such as PROC, .SETFRAME. .PUSHREG

Writing x64 Assembly code using MASM, we can use these directives to provide frame unwinding information. For example, from .SETFRAME definition: These directives do not generate code; they only generate .xdata and .pdata. Since these directives…
Alex F
  • 42,307
  • 41
  • 144
  • 212
1
vote
5 answers

Pointer validity after stack unwinding

In C++ does a pointer remains valid after stack unwinding or not?
Ehsank
  • 173
  • 3
  • 9
1
vote
1 answer

C++ Exception not caught, program terminates with abort

This program terminates before the exception handler is caught void main(){ try{ work1(); std::thread joinableThread( [](){ work2(); } ); work3(); throw…
1
vote
0 answers

During C++ stack unwind during exception, where is local exception value stored

I am familiar with the mental model of a C++ exception, and how it can be controlled programatically. For example, everything in this answer :SO Question on topic What bewilders me, however, is how the exception object is preserved(what a catch is…
schulmaster
  • 413
  • 5
  • 16
1 2 3
8 9