Do not use this tag to refer to the Stack Overflow website. If you have a question regarding the site, please go to http://meta.stackoverflow.com. A stack overflow occurs when too much memory is used on the call stack.
0
votes
1answer
16 views
Is there a infinite loop in my codes? in ocaml
I want to get the sum of function f(i) values when i is equal from a to b
= f(a)+f(a+1)+...+f(b-1)+f(b)
So I wrote code like this.
let rec sigma : (int -> int) -> int -> int -> int
= fun ...
1
vote
0answers
20 views
StackOverflowError from Custom Moshi Adapter
I created a moshi adapter to address null String values:
public class NullStringAdapter {
@FromJson
public String stringFromJson(@Nullable String value) {
if (value.equals(null)) {
...
-2
votes
0answers
46 views
Whats wrong with my simple stack overflow exploit [duplicate]
I have a stack overflow
#include <stdio.h>
int main(int argc, char *argv[])
{
char buf[256];
memcpy(buf, argv[1],strlen(argv[1]));
printf(buf);
}
And all Im doing is ...
0
votes
0answers
3 views
how to set the video preview in the answer division in stackoverflow? [migrated]
I have to give someone the answer in the video format in stackoverflow.
Do I have to just Paste the link here or create an iframe?
2
votes
2answers
59 views
Disabling stack protection in GCC not working
I'm trying to recreate a stack buffer overflow using the classic overflow with strcpy using this function:
#include <stdio.h>
#include <string.h>
void main(int argc, char **argv) {
...
1
vote
1answer
51 views
jOOQ and StackOverflowException while fetching from a select
I use jOOQ 3.8.4 and Postgres 9.5.
I have a complex schema. Actually, when I do a simple select, like:
create.selectFrom(ARTICLE_VIEW)
.orderBy(ARTICLE_VIEW.AV_CREATION_DATE
...
5
votes
3answers
339 views
Why is my stack buffer overflow exploit not working?
So I have a really simple stackoverflow:
#include <stdio.h>
int main(int argc, char *argv[]) {
char buf[256];
memcpy(buf, argv[1],strlen(argv[1]));
printf(buf);
}
I'm trying to ...
1
vote
2answers
61 views
Quick Sort Implementation (Test for failure) in C++
I've given an assignment to implement Quicksort in C++, and I've successfully written code that seems to work. As I tested my algorithm for failure, it crashed when I had it sort numbers in a binary ...
1
vote
0answers
26 views
Stackoverflow format style [migrated]
When ask new question or comment, how can I add these format styles below?
2
votes
1answer
77 views
why is java.lang.StackOverflowError given in the computing of pi using the Taylor series expansion?
As a school project I am trying to calculate the value of pi using the taylor expansion of arctan(x), as arctan(1) = π/4. I made this program to calculate the value of pi but I need very large values ...
2
votes
1answer
32 views
Exercise about Buffer Overflow
I'm trying to find vulnerability in the following code, and i'm just guessing that it can be exploited with buffer overflow, but unfortunately i don't know where to begin with.
#include <stdio.h&...
-3
votes
0answers
11 views
How does Stack Overflow decide the “next badge” field for a user? [migrated]
The last badge I received was the Notable Question badge. I was hoping to see that the next badge for me would be Famous Question, however, Stack Overflow says that my next badge is Organizer.
I am ...
0
votes
1answer
54 views
Dagger 2 cycle injection
I have two singletone classes I'd like to inject them into Fragments, Activites, ect., but I've to inject them into each other as well.
And at that point I allways get SO error.
public class ...
2
votes
1answer
51 views
reduce and map on accumulator produces stack overflow
Why do I need to replace map with mapvin this piece of code to prevent a stack overflow:
#!/bin/bash lein-exec
(println (reduce (fn [acc _]...
-3
votes
0answers
30 views
How to build a stackoverflow like rating system? [closed]
Stack-overflow not only counts votes but based off of reputations each vote is decided to be shown publicly or not, so how is this kind of system maintained?
If there are effectively two separate ...
-3
votes
0answers
13 views
Will my answer be visible to people even if my reputation is very low? [migrated]
I am new to StackOverflow and have answered a few questions but i am not getting much responses so I have a query if my answers are visible to people
0
votes
0answers
5 views
How can we store Stackpointer value in global variable for DM3730 processor [closed]
Can anyone help me to store stackpointer value in the global variable for DM3730 processor and C++ code? Furthermore I am using Code Composer Studio 6.0.
0
votes
2answers
36 views
Event Handler triggers System.StackOverflowException
Code:
private void addExcel(object sender, TextChangedEventArgs e)
{
if (!textBox.Text.Contains('!'))
{
textBox.Text += "!";
}
StringBuilder sb = new ...
-1
votes
0answers
22 views
“MongoError: Maximum Call Stack Size Exceeded” for aggregation query
I'm creating an aggregation query for Mongo through Mongoose that looks like this:
[
{
"$match": {
"deviceId": "10"
}
},
{
"$project": {
"deviceId": {
"$literal":...
-3
votes
0answers
22 views
Why doesn't Stack Overflow open links in a new tab? [migrated]
Why doesn't Stack Overflow automatically open links in questions, comments and answers in a new tab? It drives me nuts.
I'm probably going to get down voted for posting this but I feel better for ...
1
vote
1answer
18 views
StackOverflowError when overriding Hashtable.contains() java
I have to make a class to inherit Hashcode and i need to override the contains method.
@Override
public boolean contains(Object value) {
if (!this.containsValue(value))
return true;
...
0
votes
0answers
30 views
FloodFill and BoundaryFill cause StackOverflow using FreeImage library
I'm trying to implement FloodFill and BoundaryFill algorithms using FreeImage library.
Both of these work for small objects (50x50 square) but when tried on a larger shape (100x100 square), they ...
0
votes
1answer
36 views
Why does my Quicksort implementation give stack overflow?
I have this code
public static void quicksort(int[] array){
quicksort(array, 0, array.length - 1);
}
public static void quicksort(int[] array, int min_index, int max_index){
if(array....
2
votes
0answers
38 views
Big stack frame size after compilation with clang on osx which leads to stack overflow
I have two similar recursive functions:
void dfs(const std::vector<std::vector<int64_t>>& tree, int64_t position) {
for (int64_t to : tree[position]) {
dfs(tree, to);
}
if (...
0
votes
0answers
40 views
How do I avoid stackoverflowexception within a finite loop (C#)
I'm trying to write a code to find prime numbers within a given range. Unfortunately I'm running into some problems with too many repetitions that'll give me a stackoverflowexception after prime nr: ...
3
votes
1answer
97 views
Recursion Stack Overflow C++
I am new to C++ but thought that working on some project Euler problems would familiarize me with the language.
When attempting
Project Euler Problem 14: Longest Collatz sequence
I could not manage ...
-2
votes
0answers
39 views
Stack overflow in Java code: how can I fix? [duplicate]
I have a stack overflow error in Java code.
The line at fault is this one:
int rn = this.convertToInteger();
return rn;
and the test code in JUnit don't run.
How I can fix the error? I'm new in ...
0
votes
1answer
31 views
Collatz Conjecture Recursion Error
I've lurked around for years, but today I have a question concerning my code. I am currently trying to create a collatz program that puts the number of steps for a certain number in an array, but at ...
0
votes
1answer
43 views
fixing Exception in thread “main” java.lang.StackOverflowError
Can someone pls help me to find the reason of the StackOverflowError? I was trying it for a while but still can't get why and how to fix it.
* the formula used in the code is a requirement.
Thx in ...
0
votes
1answer
51 views
Getting a Stackoverflow error while sending the instance of Main Class to another class
I am a newbie programmer trying to build the HangMan Game.
So, I have a Main class (Main JFrame) that instantiates different other panel classes. One such panel is keyboardPanel which is basically a ...
0
votes
0answers
7 views
stack-protect equivalent in clang compiler?
Most of the mature compilers appear to have good support for stack variable clobbers.
GCC: -fstack-protector
xlC: -qstackprotect
intel: -fstackprotector
windows: /RTC
For clang I've found -...
0
votes
1answer
46 views
Parse big strings using a Regex to getting java.lang.StackOverflowError error [duplicate]
This is my Regex
"(?<=\"body\":\")((?=\",|\"$)|.)+"
It tokenizes a string on body. For example,
"body":its my string
Result is
its my string
But when I use a large input string I get this ...
-1
votes
0answers
19 views
java.lang.StackOverflowError in Java [duplicate]
The following program works fine and generates the output - 54321.
Here's the code:
public class error {
static void rec(int a[],int i){
if (i>=a.length)
return;
a[i]=0;
rec(a,...
0
votes
0answers
25 views
Buffer oveflow error 0xc0000409 during linking
I have a Visual Studio 2015 solution autogenerated using Premake5. The build process uses Fastbuild to invoke the regular platform tools.
There are several dozen DLLs that are built as part of the ...
2
votes
1answer
38 views
StackOverflow runtime error on setter [duplicate]
This code gives me a System.StackOverflow runtime error:
class blue
{
public pawn[] p
{
get { return p; }
set /*it points to this curly bracket*/{ p = value; }
}
...
0
votes
1answer
42 views
Stack overflow error in minimax algorim
Hi so I've recently started programming in java and I've set myself a task of making an AI for a tic tac toe game I've made
However the minmax algorithm is throwing a Stack Overflow error and I cant ...
4
votes
3answers
140 views
What is the maximum stack level for a C++ program?
I tried to see how far could I get before getting to a stack overflow by recursion in C++. I wrote this function
long recurse( long level ) {
std::cout << level << std::endl;
...
0
votes
0answers
12 views
How does the “viewed n times” system work on Stack Overflow? [migrated]
If I ask a question on Stack Overflow and then keep on visiting that page several times, the viewed: n times metric does not change (even if I do it from an incognito tab).
How does the server ...
-3
votes
0answers
42 views
Stackoverflow exception with stringbuilder running out of capacity
found everywhere, no much help. I cannot post the full code but will post snippets. I am writing an algo with a recursive loop. This loop is called for about 2 million times and each counter appends a ...
1
vote
0answers
25 views
libasan giving stack-buffer-overflow inside time_t time (time_t *__timer) -> sys/time.h
I am facing a problem while using libasan to improve some code I have written.
Situation:
-- compile code with -fsanitize=address -lasan
-- run the code.
Sample below:
#include <iostream>
#...
-2
votes
0answers
16 views
Why does my reputation fluctuates? [migrated]
I have profile on stackoverflow as well as magento.stackexchange.com.
I have noticed within last few days that my reputation decreases after few minutes without any notice, when I get any reputation ...
1
vote
1answer
32 views
RegEx linebreaks run into an StackOverflowError
I´m using \\r\\n|\n in my Java RegEx to match linebreaks. I don´t care about mac-like newlines. Everytime I run my code, I´m getting an StackOverflowError like this:
java.lang.StackOverflowError
at ...
1
vote
1answer
23 views
Validate null property before returing
I would like to validate a null property and would like to return an empty string if it is NULL. For that I have created a class like below:
public class TestValue
{
public string CcAlias
{
...
2
votes
1answer
31 views
OmniFaces Json#encode() stack overflow with IllegalArgumentException: Cannot invoke getter of property 'classes' of bean 'class java.lang.Class'
I am experiencing a stackoverflow exception doing exactly as explained in the documentation (here)
The error occurs when sending anything other than a String (ie a bean, or HashMap).
@Push
@Inject
...
-1
votes
1answer
20 views
ViewFlipper not working, App Stopped
I have a navigation drawer in my APP.I want to create a slideshow at navigation drawer header. So, iam using ViewFlipper for nav_header.xml. I have used the following code in MainActivity. But the app ...
6
votes
1answer
108 views
Stack Buffer Overflow: Works on GDB, doesn't outside it
I readed about Stack located Buffer Overflows a long time ago, but decided to set up a virtual machine and actually see them in practice.
The following code was the vulnerable program:
#include<...
1
vote
2answers
41 views
Display the JVM's ThreadStackSize during the execution of an application
I need to debug an application that sometimes produces a StackOverflow exception. This only occurs sometimes, and I do not know where is the problem because the exception is thrown in a thread that is ...
0
votes
0answers
20 views
Individual chats for each Stackoverflow article [migrated]
Of course, I'm aware of http://chat.stackoverflow.com/
However, I think I read somewhere that Stackoverflow also had this feature to display a chat box on each article page. All visitors of the same ...
1
vote
1answer
14 views
Benefit of reimplementing recursion with manually maintained stack?
I read that maintaining a stack manually could sometimes avoid stack overflow of recursion algorithms, because manually-maintained stack is allocated in heap, which has much larger size than the run-...
-1
votes
1answer
16 views
How to detect the origin of a stack overflow error in Pure Data
I'm dealing with a stack overflow error on a big patch in Pure Data and I would like to know how can I see the object which is causing it.