Skip to main content

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 StackOverflow.com.

-1votes
1answer
56views

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
2votes
2answers
946views

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
7votes
2answers
1kviews

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
62votes
4answers
79kviews

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
-3votes
1answer
2kviews

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
3votes
1answer
2kviews

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
2votes
1answer
2kviews

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
14votes
4answers
3kviews

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
29votes
2answers
9kviews

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
4votes
6answers
12kviews

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 ...
Raiccio's user avatar
16votes
3answers
11kviews

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 do ...
marco-fiset's user avatar
25votes
1answer
2kviews

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.8k

close