stack-overflow

Gson 2.2.2 causing a stackoverflow on 4.2.1 only

僤鯓⒐⒋嵵緔 提交于 2019-11-30 18:40:41
I am developing an app for android which downloads points of interest from a server using JSON strings. Everything was working fine but since I have started testing on 4.2.1, I have been getting the following error: 01-28 15:32:14.167: E/AndroidRuntime(31174): FATAL EXCEPTION: AsyncTask #1 01-28 15:32:14.167: E/AndroidRuntime(31174): java.lang.RuntimeException: An error occured while executing doInBackground() 01-28 15:32:14.167: E/AndroidRuntime(31174): at android.os.AsyncTask$3.done(AsyncTask.java:299) 01-28 15:32:14.167: E/AndroidRuntime(31174): at java.util.concurrent.FutureTask

Why are there 8 bytes between the end of a buffer and the saved frame pointer?

拜拜、爱过 提交于 2019-11-30 15:26:50
问题 I am doing a stack-smashing exercise for coursework, and I have already completed the assignment, but there is one aspect that I do not understand. Here is the target program: #include <stdio.h> #include <stdlib.h> #include <string.h> int bar(char *arg, char *out) { strcpy(out, arg); return 0; } void foo(char *argv[]) { char buf[256]; bar(argv[1], buf); } int main(int argc, char *argv[]) { if (argc != 2) { fprintf(stderr, "target1: argc != 2\n"); exit(EXIT_FAILURE); } foo(argv); return 0; }

StackOverflowError when operating with a large number of columns in Spark

你说的曾经没有我的故事 提交于 2019-11-30 14:53:02
I have a wide dataframe (130000 rows x 8700 columns) and when I try to sum all columns I´m getting the following error: Exception in thread "main" java.lang.StackOverflowError at scala.collection.generic.Growable$$anonfun$$plus$plus$eq$1.apply(Growable.scala:59) at scala.collection.generic.Growable$$anonfun$$plus$plus$eq$1.apply(Growable.scala:59) at scala.collection.IndexedSeqOptimized$class.foreach(IndexedSeqOptimized.scala:33) at scala.collection.mutable.WrappedArray.foreach(WrappedArray.scala:35) at scala.collection.generic.Growable$class.$plus$plus$eq(Growable.scala:59) at scala

At what moment is memory typically allocated for local variables in C++?

与世无争的帅哥 提交于 2019-11-30 14:32:41
问题 I'm debugging a rather weird stack overflow supposedly caused by allocating too large variables on stack and I'd like to clarify the following. Suppose I have the following function: void function() { char buffer[1 * 1024]; if( condition ) { char buffer[1 * 1024]; doSomething( buffer, sizeof( buffer ) ); } else { char buffer[512 * 1024]; doSomething( buffer, sizeof( buffer ) ); } } I understand, that it's compiler-dependent and also depends on what optimizer decides, but what is the typical

Why are there 8 bytes between the end of a buffer and the saved frame pointer?

安稳与你 提交于 2019-11-30 14:23:46
I am doing a stack-smashing exercise for coursework, and I have already completed the assignment, but there is one aspect that I do not understand. Here is the target program: #include <stdio.h> #include <stdlib.h> #include <string.h> int bar(char *arg, char *out) { strcpy(out, arg); return 0; } void foo(char *argv[]) { char buf[256]; bar(argv[1], buf); } int main(int argc, char *argv[]) { if (argc != 2) { fprintf(stderr, "target1: argc != 2\n"); exit(EXIT_FAILURE); } foo(argv); return 0; } Here are the commands used to compile it, on an x86 virtual machine running Ubuntu 12.04 , with ASLR

rake aborted! stack level too deep [duplicate]

天大地大妈咪最大 提交于 2019-11-30 12:11:59
Possible Duplicate: Rails 3.0 & Ruby 1.9.2rc: Rake commands return 'already initialized constant' & stack level too deep errors. Any ideas Am using Ruby version 1.9.1 on windows vista. Am getting the rake aborted error for any rake commands am using. This does not happen in all my app folder. Its happening only on a specific app folder. C:\rails_project\stunetwork>rake db:reset (in C:/rails_project/stunetwork) rake aborted! stack level too deep C:/Ruby191/lib/ruby/gems/1.9.1/gems/rake-0.8.7/lib/rake.rb:2383:in `raw_load_rak efile' (See full trace by running task with --trace) try placing

How to avoid StackOverflowError for a recursive function

核能气质少年 提交于 2019-11-30 11:38:39
I'm writing a function that will call itself up to about 5000 times. Ofcourse, I get a StackOverflowError . Is there any way that I can rewrite this code in a fairly simple way?: void checkBlocks(Block b, int amm) { //Stuff that might issue a return call Block blockDown = (Block) b.getRelative(BlockFace.DOWN); if (condition) checkBlocks(blockDown, amm); Block blockUp = (Block) b.getRelative(BlockFace.UP); if (condition) checkBlocks(blockUp, amm); //Same code 4 more times for each side } By the way, what is the limitation of how deep we may call the functions? Richante Use an explicit stack of

At what moment is memory typically allocated for local variables in C++?

╄→尐↘猪︶ㄣ 提交于 2019-11-30 10:53:34
I'm debugging a rather weird stack overflow supposedly caused by allocating too large variables on stack and I'd like to clarify the following. Suppose I have the following function: void function() { char buffer[1 * 1024]; if( condition ) { char buffer[1 * 1024]; doSomething( buffer, sizeof( buffer ) ); } else { char buffer[512 * 1024]; doSomething( buffer, sizeof( buffer ) ); } } I understand, that it's compiler-dependent and also depends on what optimizer decides, but what is the typical strategy for allocating memory for those local variables? Will the worst case (1 + 512 kilobytes) be

Stack resident buffer overflow on 64-bit?

被刻印的时光 ゝ 提交于 2019-11-30 10:15:05
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 get control over the instruction pointer on my 64-bit system. I have turned off all protection mechanisms I'm aware of just to be able to play with it (NX-bit, ASLR, also compiling with -fno-stack-protector -z execstack). I don't have that much experience with 64-bit assembly and after spending some time searching and experimenting myself I'm wondering if anyone could shed some light on an issue

Can you give an example of stack overflow in C++?

蹲街弑〆低调 提交于 2019-11-30 09:35:51
Can you give an example of stack overflow in C++? Other than the recursive case: void foo() { foo(); } The typical case that does not involve infinite recursion is declaring an automatic variable on the stack that is too large. For example: int foo() { int array[1000000]; } Please see Stack overflow - Wikipedia . I have linked directly to the examples section. John Boker void function() { function(); } Thomas Here's one that might happen in practice: int factorial(int x) { return x == 0 ? 1 : x * factorial(x-1); } This overflows the stack for negative x . And, as Frank Krueger mentioned , also