https://bugzilla.novell.com/show_bug.cgi?id=664965
https://bugzilla.novell.com/show_bug.cgi?id=664965#c0 Summary: Mono ARM AOT compiler is not compatible with C5 ArrayList<T> when T is a struct Classification: Mono Product: Mono: Compilers Version: 2.6.x Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Other. AssignedTo: [email protected] ReportedBy: [email protected] QAContact: [email protected] Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_6; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.237 Safari/534.10 Mono ARM AOT compiler hungs/continues forever when CIL code contains C5 ArrayList<T> when T is a struct. Sample test case, which causes the problem: === using System.Collections; using C5; public struct myvector3 { float x; float y; float z; } public class C5_test { private ArrayList<myvector3> mList = new ArrayList<myvector3>(); } === I did additional investigation where AOT compiler is looping. There are debugging session data when interrupted in random place: (gdb) bt #0 0x002342e0 in g_list_last (list=0x2610100) at glist.c:213 #1 0x00234026 in g_list_append (list=0x5125d0, data=0x1124e) at glist.c:87 #2 0x0009ac7a in add_method_full (acfg=0x844a00, method=0x60e9da0, extra=1, depth=0) at aot-compiler.c:1838 #3 0x0009ad41 in add_extra_method_with_depth (acfg=0x844a00, method=0x60e9da0, depth=0) at aot-compiler.c:1862 #4 0x0009be11 in add_generic_class_with_depth (acfg=0x844a00, klass=0x60cab30, depth=0) at aot-compiler.c:2346 #5 0x0009bd54 in add_generic_class (acfg=0x844a00, klass=0x60cab30) at aot-compiler.c:2307 #6 0x0009c530 in add_generic_instances (acfg=0x844a00) at aot-compiler.c:2493 #7 0x000a61dc in collect_methods (acfg=0x844a00) at aot-compiler.c:5411 #8 0x000a6ede in mono_compile_assembly (ass=0x512130, opts=55650815, aot_options=0xbffff132 "full,asmonly,nodebug,static,outfile=Assembly-CSharp.dll.s") at aot-compiler.c:5733 #9 0x000930a5 in main_thread_handler (user_data=0xbfffeec0) at driver.c:979 #10 0x00095054 in mono_main (argc=3, argv=0xbfffefb8) at driver.c:1734 #11 0x00002207 in main (argc=3, argv=0xbfffefb8) at main.c:34 (gdb) f #0 0x002342e0 in g_list_last (list=0x2610100) at glist.c:213 213 while (list->next) (gdb) f 6 #6 0x0009c530 in add_generic_instances (acfg=0x844a00) at aot-compiler.c:2493 2493 add_generic_class (acfg, mono_class_from_mono_type (sig->params [j])); (gdb) list 2488 sig = mono_method_signature (method); 2489 2490 if (sig) { 2491 for (j = 0; j < sig->param_count; ++j) 2492 if (sig->params [j]->type == MONO_TYPE_GENERICINST) 2493 add_generic_class (acfg, mono_class_from_mono_type (sig->params [j])); 2494 } 2495 2496 header = mono_method_get_header (method); 2497 (gdb) p method $14 = (MonoMethod *) 0x60cc1f0 (gdb) p mono_method_get_name(0x60cc1f0) $15 = 0x7dd2a6 "Insert" (gdb) p mono_method_get_class(0x60cc1f0) $16 = (MonoClass *) 0x60ae6e0 (gdb) p ((MonoClass *)0x60ae6e0)->name $17 = 0x7dc00b "ArrayList`1" (gdb) p sig->params[j] $18 = (MonoType *) 0x60e93d0 (gdb) p mono_type_get_name(0x60e93d0) $19 = 0x7256c00 "C5.IList<C5.ArrayList.Position<C5.ArrayList.Position<C5.ArrayList.Position<C5.ArrayList.Position<C5.ArrayList.Position<C5.ArrayList.Position<C5.ArrayList.Position<C5.ArrayList.Position<C5.ArrayList.Po"... Probably last line is clue. Reproducible: Always Steps to Reproduce: 1. gmcs sample test case included into problem description. (Note: you need to add Mono.C5 reference) 2. run mono AOT ARM cross compiler on assembly built in 1st step Actual Results: mono AOT compiler runs forever with gradually growing memory usage. Expected Results: mono AOT compiler compiles assembly successfully Note: if we substitute ArrayList<T> T with class instead of struct then everything AOT compiles fine. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
