Bug 318855 (MONO75945) - [PATCH] mcs emits I4 as the default ArraySubType
Summary: [PATCH] mcs emits I4 as the default ArraySubType
Status: RESOLVED FIXED
Alias: MONO75945
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: 1.1
Hardware: Other Other
: P3 - Medium : Normal
Target Milestone: ---
Assignee: Raja R Harinath
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-31 16:30 UTC by Jain Ankit
Modified: 2007-09-15 21:24 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
testcase.cs (270 bytes, text/plain)
2005-08-31 16:31 UTC, Thomas Wiest
Details
ArraySubType.diff (501 bytes, patch)
2005-09-01 12:15 UTC, Thomas Wiest
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Wiest 2007-09-15 19:29:06 UTC


---- Reported by jankit@novell.com 2005-08-31 09:30:42 MST ----

test case:

    public extern static void marshalAsMethod (
                [MarshalAs(UnmanagedType.LPArray)] int [] p1);

For param p1 no ArraySubType is specified. compiling with mcs and
monodis'ing it shows:

radical@jankit:~> monodis --marshal r.dll
FieldMarshal Table (1..1)
1: (0x0003) Param 1: []
        blob encoding: 2a 07 ---> (07 - NATIVE_TYPE_I4)

csc and then monodis :

radical@jankit:~> monodis --marshal r-n.dll
FieldMarshal Table (1..1)
1: (0x0003) Param 1: []
        blob encoding: 2a 50 ---> (50, NATIVE_TYPE_MAX)

Attached is the test case(.cs)



---- Additional Comments From jankit@novell.com 2005-08-31 09:31:14 MST ----

Created an attachment (id=168437)
testcase.cs




---- Additional Comments From kornelpal@hotmail.com 2005-09-01 05:15:40 MST ----

Created an attachment (id=168438)
ArraySubType.diff




---- Additional Comments From rharinath@novell.com 2005-09-01 10:14:52 MST ----

Applied in SVN r49264.

I had hoped to remove the whole MarshalAsAttribute handling from the
compiler, since it's the responsibility of SRE.  However, .NET 1.1
seems to hang on this case.


Imported an attachment (id=168437)
Imported an attachment (id=168438)

Unknown operating system unknown. Setting to default OS "Other".