URL:
<http://savannah.gnu.org/bugs/?func=detailitem
&item_id=17170>
Summary: Problem with variable args of a
vararg pinvoke call
Project: DotGNU Portable.NET
Submitted by: None
Submitted on: Friday 07/21/06 at 13:40 UTC
Category: None
Severity: 3 - Normal
Item Group: None
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
_______________________________________________________
Details:
Hello,
it looks like there is something wrong with the handling of
the arguments
after the sentinel of a vararg method implemented through a
pinvoke.
I attach an executable that shows the bug (test.exe), along
with a dynamic
library required (gcc4net.dll).
The executable was produced by CIL port of GCC (see
https://gna.org/proj
ects/cil4gcc) and not with pnet C compiler, this is why
I
attached the binaries.
Never mind how it was produced, it is valid CIL, and it
should run correctly
with ilrun.
Instead, a wrong number is printed after "foo"
in the program output.
The source code of the test is:
int printf (const char*,...)
__attribute__((pinvoke("/lib/libc.so.6")));
int main()
{
printf("foo %d \n", 3);
return 0;
}
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Friday 07/21/06 at 13:40 UTC Name: test.zip Size:
3.31KB By: None
Archive containing test.exe and gcc4net.dll
<http://savannah.gnu.org/bugs/download.php?file_id=103
91>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?func=detailitem
&item_id=17170>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
_______________________________________________
Pnet-developers mailing list
Pnet-developers dotgnu.org
ht
tp://dotgnu.org/mailman/listinfo/pnet-developers
|