[Mono-bugs] [Bug 75449][Nor] New - Immediate call of function expressions causes NullReferenceException

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Jul 3 01:01:20 EDT 2005


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 flgr at ccan.de.

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

--- shadow/75449	2005-07-03 01:01:20.000000000 -0400
+++ shadow/75449.tmp.7295	2005-07-03 01:01:20.000000000 -0400
@@ -0,0 +1,61 @@
+Bug#: 75449
+Product: Mono: Compilers
+Version: unspecified
+OS: 
+OS Details: OS independent
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: JScript
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: flgr at ccan.de               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Immediate call of function expressions causes NullReferenceException
+
+Description of Problem:
+
+If you call a function expression directly after creating it you will run
+into a System.NullReferenceException from FunctionExpression:build_closure.
+
+Steps to reproduce the problem:
+1. Download test case.
+2. Compile via mjs.
+
+Actual Results:
+
+Unhandled Exception: System.NullReferenceException: Object reference not
+set to an instance of an object
+in <0x000a5> System.Reflection.Emit.ILGenerator:Emit (OpCode opcode,
+System.Reflection.Emit.LocalBuilder lbuilder)
+in <0x002ae> Microsoft.JScript.FunctionExpression:build_closure
+(Microsoft.JScript.EmitContext ec, System.String full_name)
+in <0x002da> Microsoft.JScript.FunctionExpression:Emit
+(Microsoft.JScript.EmitContext ec)
+in <0x002d3> Microsoft.JScript.Call:emit_late_call
+(Microsoft.JScript.EmitContext ec)
+in <0x00434> Microsoft.JScript.Call:Emit (Microsoft.JScript.EmitContext ec)
+in <0x00195> Microsoft.JScript.Call:emit_print_stm
+(Microsoft.JScript.EmitContext ec)
+in <0x0008f> Microsoft.JScript.Call:Emit (Microsoft.JScript.EmitContext ec)
+in <0x0006a> Microsoft.JScript.Expression:Emit
+(Microsoft.JScript.EmitContext ec)
+in <0x00144> Microsoft.JScript.Block:Emit (Microsoft.JScript.EmitContext ec)
+in <0x00011> Microsoft.JScript.ScriptBlock:Emit
+(Microsoft.JScript.EmitContext ec)
+in <0x00104> 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 <0x00199> Driver:Main (System.String[] args)
+
+Expected Results:
+
+Successful compile. Output of "foo" when run via mono.
+
+How often does this happen? 
+
+Always.


More information about the mono-bugs mailing list