All Questions
Tagged with callstack stack-overflow
31 questions
1
vote
0
answers
323
views
Max call stack is greater in while loop
all.
Would be grateful if someone could clarify the following.
We have a basic factorial function and a for loop with a try catch block which runs the function until error
"Maximum call stack ...
0
votes
2
answers
446
views
to how many subroutines can x86 processors call? [duplicate]
i'm writing a small program to print a polygon with printf("\219") to just see if whatever i'm doing is right for my kernel. but it needs to call many functions and i don't know whether x86 ...
1
vote
0
answers
155
views
Node.js stack-size silently crashing
I have a JavaScript commandline program that needs more stack space. The option for this is node --stack-size but it's not working for me. Test case:
'use strict'
function f(...a) {
console.log(a[...
3
votes
2
answers
117
views
Is it possible for a programming language to confidently prevent undefined behavior on stack overflow?
Given the following assumptions:
We cannot check the stack pointer (%rsp) before every single push or sub operation
We cannot calculate the maximum stack size at compile-time (e.g. our programming ...
1
vote
1
answer
317
views
Call Stack size?
Greetings from Michigan,
I have a program that runs continuously (logging data) where it runs inside a While loop within one Sub ("logging data" Sub), then when the log file becomes "full", it jumps ...
12
votes
1
answer
12k
views
Call Stack limitation in C# [duplicate]
i wonder how much calls we can perform in stack in c# before we get stack overflow exception
so i decided to write the following code
static void Method2(int Calls)
{
if(!Calls....
5
votes
3
answers
2k
views
The effect of a goto statement in C++ on the stack
When executing a goto statement in C++, are the two arrays in the code fragment below removed from the stack? Or will they be removed from the stack when the method returns?
retrySplit:
...
...
107
votes
12
answers
242k
views
Node.js - Maximum call stack size exceeded
When I run my code, Node.js throws a "RangeError: Maximum call stack size exceeded" exception caused by too many recursive calls. I tried to increase Node.js stack size by sudo node --stack-size=16000 ...
1
vote
1
answer
103
views
How to look up a .NET thread's stack size in using a tool?
I'm relatively new to .NET but I do understand that if infinite recursion happens in a Win32 thread, the thread stack would eventually run out of space and a stack overflow would happen.
Now i have ...
3
votes
1
answer
1k
views
Handle/avoid stack overflow in C
I understand that you can handle integer overflow by using compiler flags and signal handling (see accepted answer to this question).
In fact, you can actually prevent it.
However I've been unable ...
2
votes
2
answers
572
views
How to create endless recursion which will throw stack overflow exception?
I'm trying to create stack overflow run-time exception with following program:
void f(int a) {
cout << a << ", ";
f(++a);
}
int main () {
f(0);
return 0;
}
When I run this ...
1
vote
1
answer
252
views
Stack Overflow and Segmentationfault in C on x86-32
i have a question regarding a stack overflow in C.
I wrote a little testing program, so when i start it with 8 As, i get what i expect, i write over the borders of the second buf and therefor buf1 is ...
2
votes
3
answers
5k
views
Solve Infinite Recursion in c#
I know I'm having an infinite recursion problem in my code with a stack overflow. I just don't know how to go about fixing it, help would be appreciated.
public Point WorldToMapCell(Point worldPoint)
...
0
votes
2
answers
2k
views
Android : Stack overflow error - Recursive too deeply
I am creating a little game where you need to move troops on a map. To detect if a movement can be done I must verify if there is a way between 2 squares.
So, recursively I start from one square and ...
10
votes
3
answers
16k
views
Monitoring call stack size in Visual Studio
Is there a way to monitor the call stack size in Visual Studio ? A call stack window is provided while running but does not show the size of the stack. I am using C++ and facing stack overflow issue. ...
4
votes
3
answers
6k
views
Stack resident buffer overflow on 64-bit?
I'm studying some security related things and right now I'm playing around with my own stack. What I'm doing should be very trivial, I'm not even trying to execute the stack, simply to show that I can ...
67
votes
2
answers
69k
views
How can I increase the maximum call stack size in Node.js
This is different to other questions regarding an error message in Node that reads RangeError: Maximum call stack size exceeded in that I know exactly why I'm getting this error message. It's ...
1
vote
4
answers
214
views
Recursive looping through files stops abruptly
So I'm trying to run through every file on my harddrive, but it stops once it gets to the 2115th (I think) loop. I believe it is a stack overflow due to my use of recursion, but I'm new to C# and ...
42
votes
5
answers
74k
views
What is the use of -fno-stack-protector?
I have written an application in C, and I'm trying to understand what is the purpose of the -fno-stack-protector command when compiling. For my specific application, it makes no difference if I use ...
3
votes
4
answers
329
views
C - Manage call stack in recursive methods
I am new here and I have a problem that's bugging me.I am a beginner so please don't laugh at me.
I want to make recursive quicksort work on a large number of elements,let's say 100000.I know this ...
3
votes
5
answers
568
views
Can an excessively deep C++ class hierarchy cause a stack overflow?
Suppose I have a C++ program that has excessively deep inheritance as follows:
using namespace std;
class AbstractParentGeneration0 {
private:
...
protected:
...
public:
...
1
vote
1
answer
386
views
Callstack overflow on JSON .each
I have a list of JSON objects that I loop through and then (using the jQuery Gmap plugin found here) create markers for that object and add it to the map.
Problem is that in each browser I'm getting ...
8
votes
4
answers
717
views
Why does my program not overflow the stack when I allocate a 11MB char array while the stack upper limit is 10MB?
I have two simple C++ programs and two questions here. I'm working in CentOS 5.2 and my dev environment is as follows:
g++ (GCC) 4.1.2 20080704 (Red Hat 4.1.2-50)
"ulimit -s" output: 10240 (kbytes), ...
10
votes
8
answers
56k
views
Stack overflow C++
This is my code. When I access dtr array in initImg function it gives a stack overflow exception. What might be the reason?
#define W 1000
#define H 1000
#define MAX 100000
void initImg(int img[], ...
7
votes
3
answers
11k
views
Increase stack size when compiling with mingw?
I'm writing a recursive flood-fill algorithm to find connected components in an image, my code compiles and runs well with MSVC 2008 compiler; but the mingw-compiled binary crashed at runtime.
After ...
3
votes
3
answers
3k
views
Stack Overflow of 8086 microprocessor
What'll be the behaviour of the 8086 Microprocessor when the stack is full and even then I push something into it?
22
votes
4
answers
15k
views
Stack overflow exception in C# setter
This works:
using System;
using ConstraintSet = System.Collections.Generic.Dictionary<System.String, double>;
namespace ConsoleApplication2
{
class test
{
public ConstraintSet a ...
116
votes
13
answers
408k
views
What causes a java.lang.StackOverflowError
What can cause a java.lang.StackOverflowError? The stack printout that I get is not very deep at all (only 5 methods).
2
votes
4
answers
5k
views
VERY strange stack overflow in C++ program
I wrote a program some time ago (Mac OS X, C++, SDL, FMOD) and it perfomed rather good. But lately I wanted to extend its functionality and added some more code to it. And now, when I run it and try ...
3
votes
4
answers
2k
views
Javascript Poll server. Will this cause a stack overflow?
I am not too familiar with the specifics of every javascript implementation on each browser. I do know however that using setTimeout, the method passed in gets called on a separate thread. So would ...
11
votes
3
answers
11k
views
How to detect the point of a stack overflow
I have the following problem with my C program: Somewhere is a stack overflow. Despite compiling without optimization and with debugger symbols, the program exits with this output (within or outside ...