bugDotGNU Portable.NET - Bugs: bug #6121, Code calling sscanf is compiled...

 
 

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

bug #6121: Code calling sscanf is compiled incorrectly by cscc

Submitted by:  None
Submitted on:  Thu 23 Oct 2003 11:57:47 AM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Invalid
Privacy: PublicAssigned to: None
Open/Closed: Closed

Fri 07 Nov 2003 04:15:59 AM UTC, comment #3:

sscanf is not currently compiled into pnetC (i.e. it does
not exist). The verifier is choking on the fact that the
non-existent definition does not match the call site. Defining a dummy sscanf in the test case makes the problem
go away. Not a bug. Or at least not a bug in the compiler
or verifier. :)

Rhys Weatherley <rweather>
Project Administrator
Mon 27 Oct 2003 06:22:28 AM UTC, comment #2:

Ok, so the verifier is choking on it . Still a bug :)

Anonymous
Thu 23 Oct 2003 09:14:56 PM UTC, comment #1:

Looks correct to me. All values that are passed via a
vararg list must be first converted to their "natural
passing type". In the case of pointers, the natural
passing type is "int64". See the ABI specification in
"pnet/doc/c_language_abi.html" for more details.

Rhys Weatherley <rweather>
Project Administrator
Thu 23 Oct 2003 11:57:47 AM UTC, original submission:

The code is

int i;
sscanf("320","%d",&i);

but it compiled as

ldsflda valuetype '$strings'/'type4' '$strings'::'str0'
ldsflda valuetype '$strings'/'type3' '$strings'::'str1'
ldloca.s 0
conv.i8
call vararg int32 'sscanf'(int8 modopt(['OpenSystem.C']'OpenSystem.C'.'IsConst') , int8 modopt(['OpenSystem.C']'OpenSystem.C'.'IsConst') , ..., int64)
pop

Which is wrong (obviously).

Anonymous

 

Attached Files
file #752:  test2.il added by None (2KiB - text/plain - IL Code generated)
file #751:  test2.c added by None (110B - text/plain - The source code for test)

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Fri 07 Nov 2003 04:15:59 AM UTCrweatherStatusNone=>(Error - Not Found)
  Open/ClosedOpen=>(Error - Not Found)

Back to the top


Powered by Savane 3.1-cleanup1