stack-overflow

Linq to SQL throwing a StackOverflowException

懵懂的女人 提交于 2019-12-07 00:58:53
问题 I'm executing a pretty simple query using Linq to SQL. I'm creating the expression and then passing it to the Where() extension method. The Linq internals are throwing a StackOverflowException when I attempt to actually execute the query. Here is the code: int expectedCount = 4; Expression<Func<Thing, bool>> expression = ...; //Expression looks like (LocaleID = 1 && GenderID ==1 && (TimeFrameID == 2007 || TimeFrameID == 2008)) using (XYZDataContext context = new XYZDataContext()) { int count

determine stack depth in javascript using javascript

扶醉桌前 提交于 2019-12-07 00:55:40
问题 Is there a way to determine the stack depth of all functions being executed in javascript by using javascript itself? I'm thinking it might involve modifying the Function prototype, but I really don't have any idea. Additionally, it would be nice to be able to break anytime the stack depth were sufficiently high. The reason for this is that I have a stack overflow error in IE which is apparently not debuggable. I'm lazy and I would rather not have to hunt through the code that I'm maintaining

Stack overflow at line 0

ぃ、小莉子 提交于 2019-12-06 23:58:58
问题 I have a form validation script that is unfortunately returning the Stack overflow at line 0 alert box shortly before crashing (IE7) and just straight up crashes in IE8 (It does work first, very slowly). I have made a jsFiddle for your testing pleasure: http://jsfiddle.net/yuNXm/2/ the stack overflow occurs after you have entered a value into an input which requires validation and then lose it's focus. (the email field is ajax driven so won't function there). The relevant Javascript: jQuery

Why doesn't this recursion produce a StackOverFlowException?

喜你入骨 提交于 2019-12-06 21:59:42
问题 What is wrong with this code: using System; namespace app1 { static class Program { static int x = 0; static void Main() { fn1(); } static void fn1() { Console.WriteLine(x++); fn1(); } } } I compile this piece of code using this command: csc /warn:0 /out:app4noex.exe app4.cs When I double click on the exe, it doesn't seem to throw the exception (StackOverFlowException), and keep running forever. Using visual studio command prompt 2010, but I also have vs 2012 installed on the system, all up

Why am I not getting a stack overflow?

别等时光非礼了梦想. 提交于 2019-12-06 18:21:32
问题 EDIT Before you got excited see important edits in the end and if you're still curious these are reported as: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696222 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=696263 I have been trying a piece of code and surprised to see that I didn't get a stackoverflow. Trying to simplify things I even got this far: #include <stdio.h> int main() { int i; /* 1,500,000,000 x 4 bytes = 6,000,000,000 bytes = 6GB */ int size = 1500000000; int arr[size];

StackOverflowError when i serialize an object

杀马特。学长 韩版系。学妹 提交于 2019-12-06 12:11:30
I want to seriliaze an object with this method : public void serializ(CRDT m) throws IOException { ByteArrayOutputStream byteOutput = new ByteArrayOutputStream(); ObjectOutputStream stream = new ObjectOutputStream(byteOutput); stream.writeObject(m); sumMemory = byteOutput.size(); stream.flush(); stream.close(); byteOutput.flush(); byteOutput.close(); } I have an exception java.lang.StackOverflowError Exception in thread "main" java.lang.StackOverflowError at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1169) at java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream

VERY strange stack overflow in C++ program

廉价感情. 提交于 2019-12-06 09:37:10
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 to test the new functionality, the program crashes with SIGABRT. Looking into debugger, on function stack I see: _kill kill$UNIX2003 raise __abort __stack_chk_fail odtworz <-- my function that was was modified As far as I know, "__stack_chk_fail" indicates a stack overflow. But that's not the weirdest thing about it. In this function "odtworz", I have some code like this: ... koniec = 0; while (

runtime: goroutine stack exceeds 1000000000-byte limit, fatal error: stack overflow on printing a nested struct

寵の児 提交于 2019-12-06 08:22:01
问题 I have a nested struct. type ConfigOne struct { // Daemon section from config file. Daemon daemon } type daemon struct { Loglevel int Logfile string } And I have a String() string method on that type, which I am trying to return the nested struct elements as func (c ConfigOne)String() string{ return fmt.Sprintf("%+v\n", c) } When I am trying to print it as c := &modules.ConfigOne{} c.Daemon.Loglevel = 1 c.Daemon.Logfile = "/tmp/test.log" modules.Logger.Infoln(c.String()) I am getting the

Tail recursion issue

依然范特西╮ 提交于 2019-12-06 06:43:51
问题 We were experimenting with parallel collections in Scala and wanted to check whether the result was ordered. For that, I wrote a small function on the REPL to do that check on the very large List we were producing: def isOrdered(l:List[Int]):Boolean = { l match { case Nil => true case x::Nil => true case x::y::Nil => x>y case x::y::tail => x>y & isOrdered(tail) } } It fails with a stackOverflow (how appropriate for a question here!). I was expecting it to be tail-optimized. What's wrong? 回答1:

Execution of function pointer to Shellcode

纵然是瞬间 提交于 2019-12-06 06:23:38
I'm trying to execute this simple opcode for exit(0) call by overwriting the return address of main. The problem is I'm getting segmentation fault. #include <stdio.h> char shellcode[]= "/0xbb/0x14/0x00/0x00/0x00" "/0xb8/0x01/0x00/0x00/0x00" "/0xcd/0x80"; void main() { int *ret; ret = (int *)&ret + 2; // +2 to get to the return address on the stack (*ret) = (int)shellcode; } Execution result in Segmentation error. [user1@fedo BOF]$ gcc -o ExitShellCode ExitShellCode.c [user1@fedo BOF]$ ./ExitShellCode Segmentation fault (core dumped) This is the Objdump of the shellcode.a [user1@fedo BOF]$