bugDotGNU Portable.NET - Bugs: bug #17170, Problem with variable args of a...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #17170: Problem with variable args of a vararg pinvoke call

Submitter:  None
Submitted:  Fri 21 Jul 2006 01:40:22 PM UTC
   
 
Category:  None Severity:  3 - Normal
Item Group:  None Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open

Fri 14 Mar 2008 07:26:03 AM UTC, comment #1: 

Work fine

----------------------
online

Anonymous
Fri 21 Jul 2006 01:40:22 PM UTC, original submission:  

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/projects/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;
}

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #10391:  test.zip added by None (3KiB - application/x-zip-compressed - Archive containing test.exe and gcc4net.dll)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

 

Follows 1 latest change.

Date Changed by Updated Field Previous Value => Replaced by
2006-07-21 None Attached File- Added test.zip, #10391

Back to the top

Powered by Savane 3.13-cf05.
Corresponding source code