Bug 315152 (MONO60332) - Field initializer of multidimentional arrays not always run
Summary: Field initializer of multidimentional arrays not always run
Status: RESOLVED MOVED
Alias: MONO60332
Product: Mono: Runtime
Classification: Mono
Component: misc (show other bugs)
Version: unspecified
Hardware: Other Mac OS X 10.3
: P3 - Medium : Major
Target Milestone: ---
Assignee: Paolo Molaro
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-17 09:24 UTC by Robert Shade
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 (243 bytes, text/plain)
2004-06-17 09:25 UTC, Thomas Wiest
Details

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


---- Reported by rshade@dvsconsulting.com 2004-06-17 02:24:12 MST ----

Multidimentional arrays are not being initialized when initialized with:

class T
{
    int[,] i = new int[1,1];
    ...
}

a reference to i[0,0] results in a NullReferenceException.

However, this works:

class T
{
    int[,] i2 = new int[,] { {0} }
    ...
}



---- Additional Comments From rshade@dvsconsulting.com 2004-06-17 02:25:28 MST ----

Created an attachment (id=166269)
Testcase




---- Additional Comments From rshade@dvsconsulting.com 2004-06-17 02:28:41 MST ----

It seems to run ok in the interpreter, so this might be a PPC specific issue with the JIT.  I 
don't have an x86 machine around to test, though.



---- Additional Comments From miguel@ximian.com 2004-06-17 10:35:55 MST ----

This works fine on x86.

It does indeed fail on PPC.



---- Additional Comments From lupus@ximian.com 2004-06-18 12:34:18 MST ----

Cvs handles this case now, but to better fix all the architectures 
https://bugzilla.novell.com/show_bug.cgi?id=MONO59509 needs to be fixed.
Thanks for the test case.

*** This bug has been marked as a duplicate of https://bugzilla.novell.com/show_bug.cgi?id=MONO59509 ***

Imported an attachment (id=166269)

Unknown bug field "cf_op_sys_details" encountered while moving bug
   <cf_op_sys_details>OS 10.3</cf_op_sys_details>
This bug was marked DUPLICATE in the database it was moved from.
    Changing resolution to "MOVED"