[Mono-dev] Changing an assembly loaded with ReflectionOnlyLoadFrom
David McFarland
corngood at gmail.com
Mon Dec 24 03:00:18 UTC 2012
Done: https://bugzilla.xamarin.com/show_bug.cgi?id=9128
It's not a great bug because I'm not totally sure what the expected
behaviour is. I imagine it will fail in a totally different way on
ms.net, but I don't have a windows machine to test on atm.
The test I added is not suitable for commit, because I had to dump in
my problem .dlls in binary form. I tried cooking something up with
reflection.emit, but I couldn't reproduce the problem. Still, it
should be pretty easy to apply the patch and verify.
Thanks
On Sun, Dec 23, 2012 at 2:35 PM, Rodrigo Kumpera <kumpera at gmail.com> wrote:
> Please file a bug with a test case.
>
>
> On Sun, Dec 23, 2012 at 1:18 PM, David McFarland <corngood at gmail.com> wrote:
>>
>> I just reported this bug on monodevelop, but I'm seeing some scary
>> stuff inside mono itself:
>>
>> https://bugzilla.xamarin.com/show_bug.cgi?id=9124
>>
>> As part of the build process, MSBuild loads a dependent assembly with
>> ReflectionOnlyLoadFrom to determine it's referenced assemblies. If
>> you then structurally change the assembly on disk, and do another
>> build, you get garbage inside GetReferencedAssemblies() like this:
>> Normally:
>>
>> ---------------------------
>> Breakpoint 1, ves_icall_System_Reflection_Assembly_GetReferencedAssemblies
>> (assembly=<optimized out>) at icall.c:4506
>> 4506 args [0] = mono_string_new (domain,
>> mono_metadata_string_heap (image, cols [MONO_ASSEMBLYREF_CULTURE]));
>> 2: count = 2
>> 1: cols = {4, 0, 0, 0, 0, 8140, 26646, 0, 0}
>> ---------------------------
>>
>> After Changing the Assembly:
>> ---------------------------
>> Breakpoint 1, ves_icall_System_Reflection_Assembly_GetReferencedAssemblies
>> (assembly=<optimized out>) at icall.c:4506
>> 4506 args [0] = mono_string_new (domain,
>> mono_metadata_string_heap (image, cols [MONO_ASSEMBLYREF_CULTURE]));
>> 2: count = 2
>> 1: cols = {1533, 17340, 1, 512, 1138361855, 1, 512, 1537, 17395}
>> ---------------------------
>>
>> Which causes it (usually) to try to create a CultureInfo with some
>> random string data.
>>
>> This is on linux, btw. Maybe on windows the file would be locked?
>> _______________________________________________
>> Mono-devel-list mailing list
>> Mono-devel-list at lists.ximian.com
>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
>
More information about the Mono-devel-list
mailing list