[Mono-bugs] [Bug 69678][Nor] New - Inlining does not deal with stackalloc in the callee
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Thu, 18 Nov 2004 16:12:08 -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 bmaurer@users.sf.net.
http://bugzilla.ximian.com/show_bug.cgi?id=69678
--- shadow/69678 2004-11-18 16:12:08.000000000 -0500
+++ shadow/69678.tmp.15649 2004-11-18 16:12:08.000000000 -0500
@@ -0,0 +1,40 @@
+Bug#: 69678
+Product: Mono: Runtime
+Version: 1.1
+OS:
+OS Details:
+Status: NEW
+Resolution:
+Severity:
+Priority: Normal
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: bmaurer@users.sf.net
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Inlining does not deal with stackalloc in the callee
+
+Consider:
+
+unsafe class X {
+ static void Main ()
+ {
+ for (int i = 0; i < 1000; i ++)
+ Foo ();
+ }
+
+ static void Foo ()
+ {
+ byte* foo = stackalloc byte [128 * 1024];
+ }
+}
+
+We inline foo, so we get:
+
+for (int i = 0; i < 1000; i ++) {
+ byte* foo = stackalloc byte [128 * 1024];
+}
+
+Giving a stack overflow