[Mono-bugs] [Bug 78828][Maj] New - Another simple tailcall bug in Mono JIT

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Jul 11 21:52:10 EDT 2006

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 bbjamey at gmail.com.


--- shadow/78828	2006-07-11 21:52:10.000000000 -0400
+++ shadow/78828.tmp.16893	2006-07-11 21:52:10.000000000 -0400
@@ -0,0 +1,63 @@
+Bug#: 78828
+Product: Mono: Runtime
+Version: 1.1
+OS Details: i586 Linux or Windows
+Status: NEW   
+Priority: Major
+Component: JIT
+AssignedTo: lupus at ximian.com                            
+ReportedBy: bbjamey at gmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Another simple tailcall bug in Mono JIT
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+Steps to reproduce the problem: 
+1. Download F# (see research.microsoft.com/fsharp)
+2. Install bin/fslib.dll and bin/mllib.dll into Mono GAC 
+3. Put the following program into bug.fs and compile and it using "fsc -g 
+4. Run the program "mono bug.exe"
+let mk r = 
+  printf "THIS SHOULD BE PRINTED!!!!\n";
+  [1]
+let rec add n t = 
+  match t with 
+  | [] -> [n]
+  | k2::r -> if n < 0 then mk (add n r) else mk (add n r);;
+add 2 [1];;
+printf "---> You should have seen a line printed before this, but mk 
+never gets called!"
+Actual Results: One line get printed
+Expected Results: Two lines get printed
+How often does this happen? Always on Mono 1.1.16
+Additional Information: I've included this bug to show you how simple F# 
+programs are affected by the tailcall problems.  It may also help you to 
+get more F# test cases and coverage w.r.t. tailcalls.  It may also help 
+you see the combination of features where tailcalls are busted (here you 
+need the conditional, and minor variations either work or reveal problems 
+similar to the other tailcall bugs)

More information about the mono-bugs mailing list