[Mono-bugs] [Bug 73078][Wis] New - mjs, does not handle properly free ocurrences of function calls inside methods.

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sun, 27 Feb 2005 03:08:10 -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 cesar@ciencias.unam.mx.

http://bugzilla.ximian.com/show_bug.cgi?id=73078

--- shadow/73078	2005-02-27 03:08:10.000000000 -0500
+++ shadow/73078.tmp.27746	2005-02-27 03:08:10.000000000 -0500
@@ -0,0 +1,63 @@
+Bug#: 73078
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: JScript
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: cesar@ciencias.unam.mx               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mjs, does not handle properly free ocurrences of function calls inside methods.
+
+Description of Problem:
+If a program has a N functions at global level and inside of any of them 
+another of the N gets called, the MethodInfo of it has not already been
+properly defined and inited. 
+
+Steps to reproduce the problem:
+Compile attached test case. 
+
+Actual Results:
+cesar@itaca:~/mono/mcs/jtests> mjs oper001.js
+                                                                          
+                         
+Unhandled Exception: System.ArgumentNullException: Argument cannot be null.
+Parameter name: method
+in <0x0011b> System.Reflection.Emit.ILGenerator:Emit (OpCode opcode,
+System.Reflection.MethodInfo method)
+in <0x00131> Microsoft.JScript.Call:emit_func_call
+(System.Reflection.Emit.MethodBuilder mb, Microsoft.JScript.EmitContext ec)
+in <0x00155> Microsoft.JScript.Call:Emit (Microsoft.JScript.EmitContext ec)
+in <0x0006a> Microsoft.JScript.Expression:Emit
+(Microsoft.JScript.EmitContext ec)
+in <0x00161> Microsoft.JScript.Block:Emit (Microsoft.JScript.EmitContext ec)
+in <0x001bf> Microsoft.JScript.FunctionDeclaration:Emit
+(Microsoft.JScript.EmitContext ec)
+in <0x000f1> Microsoft.JScript.Block:Emit (Microsoft.JScript.EmitContext ec)
+in <0x00011> Microsoft.JScript.ScriptBlock:Emit
+(Microsoft.JScript.EmitContext ec)
+in <0x0010a> Microsoft.JScript.CodeGenerator:Emit (Microsoft.JScript.AST prog)
+in <0x00015> Microsoft.JScript.CodeGenerator:Run (System.String file_name,
+Microsoft.JScript.AST prog)
+in <0x0021b> Microsoft.Vsa.BaseVsaEngine:Compile ()
+in <0x00186> Driver:Main (System.String[] args)
+cesar@itaca:~/mono/mcs/jtests>
+
+
+Expected Results:
+ApInitTest: Oper001
+        ApInitScenario: Default string comparison
+        succeeded
+
+How often does this happen? 
+Always.
+
+Additional Information:
+svn version from Sun Feb 27 01:04:21 CST 2005