I found the problem. When unwinding the stack in exceptions.c a test was using EIP when it should have used EBP. There was a similar typo in the exceptions docs file. A patch for both is attached. It is just dumb luck that on Linux the top of the stack is at a larger address than the code.
Other things I found along the way and am looking in to: - MethodInfo.GetMethod(System.String) doesn't work on mono. The overload which takes an array of parameter Types does, however. - .Net's implementation of MethodInfo.Invoke() catches all Exceptions (need to check if it also catches non-CLS exceptions) and wraps them in a TargetInvocationException before throwing that to the caller. Mono lets the original exception pass through. - I have a vague recollection of reading somewhere that .Net doesn't run finally clauses until it finds a matching catch block for the exception. Mono calls the finally blocks as it unwinds the stack. I'm scratching my head to figure out if it matters. I'm going to write some tests to see if I can find any ways in which mono's behavior differs from .Net in this area. Now that the corlib unit tests are kind of working on windows, I'm working on a test case for MethodInfo as I go. Please let me know if I should enter these issues in bugzilla as well. Linus -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of Nick Drochak Sent: Monday, April 29, 2002 8:04 AM To: 'Linus Upson'; [EMAIL PROTECTED] Subject: RE: [Mono-list] RFC: Corlib Unit Test on Linux How-To | I tried testing corlib on Windows (using mono, not .net, very | similar to the setup you describe in the HOWTO) and am | running in to a problem. It appears that the Windows With the recent changes to cvs, I am getting this: $ ./mono NUnitConsole.exe MonoTests.AllTests,corlib_test.dll . (process:3972): ** WARNING **: unhandled exception System.ArgumentNullException: "Argument cannot be null" in System.Array:Sort () in MonoTests.System.ArrayTest:TestSort () in (unmanaged) System.Reflection.MonoMethod:InternalInvoke () Seems like mono stopping on the first exception thrown, like --dieonex does for mint. | I'm new to mono so I'm not set up to debug the runtime yet. | Is it possible to build/debug the mono runtime with the MSFT | tools or should I install gdb to track this down? I haven't tried debugging on windows yet, except with a little bit of gdb. I had some problems which I don't remember any more and gave up. However, maybe it's time to try again. Nick D. _______________________________________________ Mono-list maillist - [EMAIL PROTECTED] http://lists.ximian.com/mailman/listinfo/mono-list
exceptions.patch
Description: Binary data
