[Mono-bugs] [Bug 74015][Maj] New - Precompile mode does not load all the required and assemblies and precompile
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Wed, 23 Mar 2005 09:39:27 -0500 (EST)
Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.
Changed by vasantha.paulraj@honeywell.com.
http://bugzilla.ximian.com/show_bug.cgi?id=74015
--- shadow/74015 2005-03-23 09:39:26.000000000 -0500
+++ shadow/74015.tmp.24689 2005-03-23 09:39:27.000000000 -0500
@@ -0,0 +1,92 @@
+Bug#: 74015
+Product: Mono: Runtime
+Version: unspecified
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Major
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: vasantha.paulraj@honeywell.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Precompile mode does not load all the required and assemblies and precompile
+
+Description of Problem:
+Currently in mono 1.1.4 version mono_assembly_load_references splited and
+written as two fucntions mono_assembly_load_reference and
+mono_assembly_load_references. But inside mono_assembly_load_references
+the function mono_assembly_load_reference which is required to be called
+is not called\ missing in the code. Due to this while precompiling the
+assemblies all the required assemblies wont get loaded and precompiled.
+
+Steps to reproduce the problem:
+1. using System;
+using System.Data;
+using System.Runtime.Remoting;
+using System.Runtime.Remoting.Channels;
+using System.Runtime.Remoting.Channels.Tcp;
+
+namespace HelloWorld
+{
+ class Class1
+ {
+ [STAThread]
+ static void Main(string[] args)
+ {
+ //
+ // TODO: Add code to start application here
+ //
+ //System.Console.WriteLine("Hello World from C#
+application. Press <Enter> to continue");
+ System.Runtime.Remoting.Channels.Tcp.TcpChannel
+tcp;
+
+ }
+ }
+}
+2. Generate IL
+3. Precompile and execute the application using mono runtime.
+
+Actual Results:
+1. Loads and precompiles only corlib assembly.
+
+Expected Results:
+1. It should and load precompile all the required assemblies.
+
+How often does this happen?
+all the time
+
+Proposed Fix:(+ indicating newly added lines)
+void
+mono_assembly_load_references (MonoImage *image, MonoImageOpenStatus
+*status)
+{
+ MonoTableInfo *t;
+ int i;
+
+ *status = MONO_IMAGE_OK;
+
+ t = &image->tables [MONO_TABLE_ASSEMBLYREF];
+
+ image->references = g_new0 (MonoAssembly *, t->rows + 1);
+ +/*
+ +* Load any assemblies this image references
+ +*/
+ + for (i = 0; i < t->rows; i++) {
+ + mono_assembly_load_reference(image, i);
+ +}
+
+ /* resolve assembly references for modules */
+ for (i = 0; i < image->module_count; i++){
+ if (image->modules [i]) {
+ image->modules [i]->assembly = image->assembly;
+ mono_assembly_load_references (image->modules
+[i], status);
+ }
+ }
+}