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
1
vote
5 answers

unwind to the first frame of a recursive call in Java?

Suppose I have a (very simple) recursive method like this: public static void myMeth(int n) { // do something // now execute the recursive call if (n < 0) return; else if ( n == SOME_CONST ) throw new…
One Two Three
  • 22,327
  • 24
  • 73
  • 114
1
vote
1 answer

Stack unwinding dynamically created object whose constructor acts also on heap

When a constructor of a class allocates memory on the heap, e.g. class bla { private: double *data; int size; public: bla(int s) { size = s; data = new double [size]; } …
mb84
  • 683
  • 1
  • 4
  • 13
1
vote
1 answer

x64 stack unwinding and checking if the RIP is in the epilog

I want to unwind a x64 callstack, so I'm trying to follow the "UNWIND procedure" I found here: http://msdn.microsoft.com/en-us/library/8ydc79k6.aspx I understand that if the RIP is in the epilog, we need to compute the offset of the RSP considering…
Idov
  • 5,006
  • 17
  • 69
  • 106
1
vote
1 answer

How do I unwind a seque from a random initial controller

I have in a storyboard a managed container view. I have four views that the user can swipe around and around. If a user does a double , double touch tap, I send them to a new controller. The question is, how do I take them back? I want a double…
jimijon
  • 2,046
  • 1
  • 20
  • 39
1
vote
1 answer

Configure and build libunwind for a mips target

Does anyone know how to configure and build libunwind for a mips target (which is not the host on which the library is being built)?
c-is-best
  • 146
  • 2
  • 9
1
vote
2 answers

Is it safe to throw / catch on stack unwind?

Q: Is it safe to throw and catch an exception on stack unwind, or does the application call terminate on the second throw? minimal example: void some_function() { try { // do stuff here that can throw throw…
utnapistim
  • 26,809
  • 3
  • 46
  • 82
0
votes
2 answers

Shouldn't I use _endthreadex() in thread procedure for stack unwinding?

I examined about stack unwinding on thread procedure in win32 environment. My test code is the following. class Dummy { public: Dummy() { wcout << L"dummy ctor" << endl; } ~Dummy() { wcout << L"dummy dtor" << endl; } }; void InnerFunc() { …
Kyokook Hwang
  • 2,682
  • 21
  • 36
0
votes
0 answers

Exception Handling in C++ Implementation: What is the "alternative function entry point", entered by the unwinding library to destruct local objects?

Here is a very simple file in c++ class C { public: C(){} ~C(){} }; void g() { throw std::exception(); } void f() { C c; g(); } int main() { return 0; } LLVM produces the following (please note the comment I've added,…
alex35833
  • 107
  • 6
0
votes
1 answer

How to produce usable callstack on ARM?

I develop C++ application on ARM (Raspberry Pi, g++ (Raspbian 8.3.0-6+rpi1) 8.3.0 ). When I try to debug my code or the application crashes in my code, I get the correct callstack without any problem. But when the application crashes in external…
bigmuscle
  • 419
  • 1
  • 6
  • 16
0
votes
0 answers

STM32 sudden binary size increase

I am currently playing around with embedded C++ programming, I am trying to understand the C HAL provided by ST, rework it in modern C++, optimize some stuff away, etc. I got to the point where I can blink an LED. The size of my current binary is…
Marcell Juhász
  • 528
  • 3
  • 9
0
votes
0 answers

Wrong value when unwinding for the IP register on Mac M1 program

I am trying to use unwind in Mac M1 but getting the wrong results. here is my program (I took one of the unwind tests). /* libunwind - a platform-independent unwind library Copyright (C) 2001-2004 Hewlett-Packard Co Contributed by David…
yehudahs
  • 2,488
  • 8
  • 34
  • 54
0
votes
1 answer

When 'nested stack unwinding' is OK?

AS I understand that we can not throw exceptions from dtor, and the reason is said like: "if an exception was thrown inside 'stack unwinding', then there is no clear way to handle 'nested unwinding', thus 'throwing from dtor' is prohibited.". What…
grizzlybears
  • 492
  • 2
  • 9
0
votes
0 answers

unwind causing segmentation fault

I am using backward-cpp (https://github.com/bombela/backward-cpp) to print the stack trace. However, this gives segmentation fault. Following is the gdb trace of the stack : 0x00007ffff608e357 in _Unwind_Backtrace () from…
Proy
  • 336
  • 2
  • 13
0
votes
1 answer

glibc: unable to get unwind information for certain sections

I am currently facing issue with the glibc v2.22 where I am not able to get the proper unwind information. When there is SIGABRT application, it is calling abort function from glibc. It should be using unwind information which is enabled in the…
Aliasgar
  • 33
  • 3
0
votes
1 answer

Why .eh_frame and .eh_frame_hdr does not exist in the clang 32bit so?

I'm trying to use the command readelf -S libtest.so on the 32bit libtest.so which compiled with clang11 --target=arm-linux-androideabi21 -march=armv7-a & cflags -funwind-table -fno-exceptions. The .eh_frame or .eh_frame_hdr segment can not be found…
ZengQ
  • 11
  • 1
1 2 3
8 9