[Mono-bugs] [Bug 78973][Wis] New - Vararg pinvoke calls do not pop variable args

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Fri Jul 28 12:31:18 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 roberto.costa at st.com.


--- shadow/78973	2006-07-28 12:31:18.000000000 -0400
+++ shadow/78973.tmp.29658	2006-07-28 12:31:18.000000000 -0400
@@ -0,0 +1,35 @@
+Bug#: 78973
+Product: Mono: Runtime
+Version: unspecified
+OS Details: 
+Status: NEW   
+Priority: Wishlist
+Component: misc
+AssignedTo: massi at ximian.com                            
+ReportedBy: roberto.costa at st.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: Vararg pinvoke calls do not pop variable args
+The bug occurs in the presence of vararg methods implemented through
+pinvokes. It looks like that arguments after the sentinel aren't popped out
+of the evaluation stack, which leads to a verification error.
+Below is an example that shows the problem. It has to be compiled by
+gcc4cil, and it requires gcc4net.dll from gcc4cil:
+int printf (const char*,...) __attribute__((pinvoke("/lib/libc.so.6")));
+int main()
+    printf("foo %d \n", 3);
+    return 0;
+If the last argument of printf is removed, then it works.

More information about the mono-bugs mailing list