[Mono-dev] Process.GetCurrentProcess().Modules crashes on Mac OS X Snow Leopard

Tom Philpot tom.philpot at logos.com
Wed Sep 23 19:55:26 EDT 2009


Since Romain¹s fix didn¹t seem to fix the issue, I did some digging today.
This seems to fix the issue sufficiently for us on Snow Leopard.

Apparently not all dylibs on Snow Leopard have a __data section. For example
Cocoa on Snow Leopard does not, but Cocoa on Leopard does.

otool -l /System/Library/Frameworks/Cocoa.framework/Versions/Current/Cocoa |
grep __data

Please have at the attached patch and see if there are any issues.

I¹m contributing this under the MIT/X11 license.

Thanks,
Tom

On 8/31/09 5:01 PM, "Tom Philpot" <tom.philpot at logos.com> wrote:

> https://bugzilla.novell.com/show_bug.cgi?id=533893
> 
> Romain Tartière has suggested a fix in the comments that would probably work
> for MacOSX.
> 
> Any chance of getting this merged into SVN?
> 
> Thanks,
> Tom
> 
> 
> On 8/24/09 3:00 PM, "Rodrigo Kumpera" <kumpera at gmail.com> wrote:
> 
>> Please file a bug about this.
>> 
>> On Mon, Aug 24, 2009 at 6:27 PM, Tom Philpot <tom.philpot at logos.com> wrote:
>>> We just discovered this issue with Mono 2.4.2.3 on Mac OS X under the most
>>> recent Snow Leopard build.
>>> 
>>> System.Diagnostics.Process.GetCurrentProcess().Modules fails with a crash.
>>> 
>>> Snow:MacOS dev$ csharp
>>> Mono C# Shell, type "help;" for help
>>> 
>>> Enter statements below.
>>> csharp> System.Diagnostics.Process.GetCurrentProcess().Modules;
>>> Stacktrace:
>>> 
>>>   at (wrapper managed-to-native)
>>> System.Diagnostics.Process.GetModules_internal (intptr) <0x00004>
>>>   at (wrapper managed-to-native)
>>> System.Diagnostics.Process.GetModules_internal (intptr) <0xffffffff>
>>>   at System.Diagnostics.Process.get_Modules () <0x0001d>
>>>   at (wrapper remoting-invoke-with-check)
>>> System.Diagnostics.Process.get_Modules () <0xffffffff>
>>>   at Class0.Host (object&) <0x00015>
>>>   at Mono.CSharp.Evaluator.Evaluate (string,object&,bool&) <0x00086>
>>>   at Mono.CSharpShell.Evaluate (string) <0x00031>
>>>   at Mono.CSharpShell.ReadEvalPrintLoopWith (Mono.CSharpShell/ReadLiner)
>>> <0x00077>
>>>   at Mono.CSharpShell.ReadEvalPrintLoop () <0x0008a>
>>>   at Mono.CSharpShell.Run (string[]) <0x00017>
>>>   at Mono.Driver.Main (string[]) <0x0016d>
>>>   at (wrapper runtime-invoke) Mono.Driver.runtime_invoke_int_object
>>> (object,intptr,intptr,intptr) <0xffffffff>
>>> Abort trap
>>> Snow:MacOS dev$
>>> 
>>> _______________________________________________
>>> Mono-devel-list mailing list
>>> Mono-devel-list at lists.ximian.com
>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>> 
>> 
> 
> 
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list


------ End of Forwarded Message

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090923/ac1253c4/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: patch_bug_533893.diff
Type: application/octet-stream
Size: 648 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20090923/ac1253c4/attachment.obj 


More information about the Mono-devel-list mailing list