[Mono-osx] "Illegal instruction" for stack overflow
Chuck Esterbrook
chuck.esterbrook at gmail.com
Fri Apr 4 21:52:54 EDT 2008
On Mono 1.9_5 on Mac OS X 10.4, a stack overflow due to unlimited
recursion causes an "Illegal instruction". What I really want is the
last set of stack frames. Python does this and it's great for quickly
diagnosing the recursion cycle.
In January, I mentioned this to Miguel de Icaza who I sat next to at
Lang.NET. He showed me that with the then-current Mono built from
svn/source, this worked. Unless I was dreaming...? :-)
I'm wondering what happened to that, or if there is an environment
variable or something I have to set.
Here is some offensive code:
class X {
public static void Main() {
Main();
}
}
Of course, the example is silly, but the real life occurrences involve
thousands of lines of code cranking on complex object graphs.
I tried cms and gmcs, and I tried -debug+ with the compilers and
--debug with mono. No luck with getting a partial stack trace.
$ gmcs -debug+ stack-overflow.cs
$ mono --debug stack-overflow.exe
Illegal instruction
-Chuck
More information about the Mono-osx
mailing list