[Mono-bugs] [Bug 76303][Wis] New - Miscompilation of function's argument used in a nested function.

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sat Oct 1 02:25:12 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 cnataren at novell.com.

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

--- shadow/76303	2005-10-01 02:25:12.000000000 -0400
+++ shadow/76303.tmp.5304	2005-10-01 02:25:12.000000000 -0400
@@ -0,0 +1,66 @@
+Bug#: 76303
+Product: Mono: Compilers
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: JScript
+AssignedTo: cesar at ciencias.unam.mx                            
+ReportedBy: cnataren at novell.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Miscompilation of function's argument used in a nested function.
+
+* Description of Problem:
+
+Suppose we have a function f and a nested method g. If f receives a
+parameter i and is used inside g, we are currently loading/storing the arg
+created at f, that's completely incorrect; we must generate code that
+propagates the state of function arguments in outter scopes through the
+StackFrame, just like in variable declarations.
+
+
+* Steps to reproduce the problem:
+Compile the following test:
+
+function f (i)
+{
+    function g ()
+    {
+        return i + 1;
+    }
+    return g ();
+}
+
+print (f (3));
+
+Actual Results:
+
+Compilation succeeded
+But when we run it, we obtain:
+
+cesar at itaca:~/mono/mcs/jtests> mono rnested.exe
+
+** ERROR **: Invalid IL code at IL0007 in JScript 0:f.g
+(object,Microsoft.JScript.Vsa.VsaEngine): IL_0007: ldarg.s   2
+
+
+aborting...
+Aborted
+
+
+Expected Results:
+
+4
+
+How often does this happen? 
+Always.
+
+Additional Information:
+
+Sat Oct  1 00:47:48 CDT 2005


More information about the mono-bugs mailing list