[Mono-dev] Changing an assembly loaded with ReflectionOnlyLoadFrom

Rodrigo Kumpera kumpera at gmail.com
Sun Dec 23 18:35:32 UTC 2012


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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20121223/3fc5d126/attachment.html>


More information about the Mono-devel-list mailing list