Questions tagged [stackoverflow]

Stack overflow is a situation when the stack is full and any item that is pushed onto it will not be incorporated and will cause stack overflow to occur. This is NOT about the website

Filter by
Sorted by
Tagged with
-1 votes
1 answer

How can we extend a packet in the case of an overflow?

I have asked this question in stackOverflow, but I guess that maybe softwareEngineering is more appropriate. (here is the question in stackOverflow) I have frames sized with a fixed size of 7 values (...
Nour's user avatar
  • 13
2 votes
2 answers

How do I prevent stack overflows from happening in this command structure with callbacks?

I have a set of jobs that I need executed. The entity that manages these jobs is responsible for composing the jobs and starting them. When a job is finished, the job uses a callback function to ...
Zimano's user avatar
  • 232
7 votes
2 answers

Ensure that callbacks registration and triggering don't cause infinite recursion

I just spent a long, miserable week debugging a stack-overflow in a C++/Qt application. The fundamental problem was that I had a function that accepted a callback, and in certain cases the callback ...
Kyle Strand's user avatar
58 votes
4 answers

How much stack usage is too much?

Lately when I've been writing C or C++, I'll declare all my variables on the stack just because it's an option, unlike with Java. However, I've heard that it's a bad idea to declare large things on ...
Elliot Way's user avatar
-3 votes
1 answer

stack based vs heap based overflow [closed]

Why is it more difficult to perform a heap based buffer overflow than a stack based? (regarding x86 architecture) I thought it could be the fact that heaps are allocating memory dynamically. But is ...
radscheit's user avatar
3 votes
1 answer

Structure of stack of a function call

I've been reading Aleph One's paper on Smashing the Stack for Fun and Profit. I wrote down example1.c from his paper, modified it a bit to see what the stack looks like on my system. I'm running ...
Torcellite's user avatar
2 votes
1 answer

What happens when both heap and stack are full?

Suppose I am using a very heavy applications(or you can say that it is a very bad code which keeps on allocating memory on heap and won't free it and also uses recursion) Now after some point of time ...
Nullpointer's user avatar
14 votes
4 answers

When there's no TCO, when to worry about blowing the stack?

Every single time there's a discussion about a new programming language targetting the JVM, there are inevitably people saying things like: "The JVM doesn't support tail-call optimization, so I ...
Cedric Martin's user avatar
29 votes
2 answers

Is it *ever* okay to catch StackOverflowError in Java?

I used to think that it's not, but yesterday I had to do it. It's an application that uses Akka (an actor system implementation for the JVM) to process asynchronous jobs. One of the actors performs ...
Ionuț G. Stan's user avatar
4 votes
6 answers

Heap overflow vs stack overflow

So as a general rule to avoid a stack overflow, big objects should be allocated to the heap (correct me if I am wrong). But, since the heap and the stack expand towards each other, wouldn't this cause ...
Rayhunter's user avatar
  • 151
16 votes
3 answers

How many are too many nested function calls?

Quoted from MSDN about StackOverflowException: The exception that is thrown when the execution stack overflows because it contains too many nested method calls. Too many is pretty vague here. How ...
marco-fiset's user avatar
  • 8,761
25 votes
1 answer

How often is seq used in Haskell production code?

I have some experience writing small tools in Haskell and I find it very intuitive to use, especially for writing filters (using interact) that process their standard input and pipe it to standard ...
Giorgio's user avatar
  • 19.6k