[Mono-bugs] [Bug 462016] make check for pinvoke2.exe fails for PowerPC
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Fri Jan 2 11:35:14 EST 2009
https://bugzilla.novell.com/show_bug.cgi?id=462016
User munroesj at us.ibm.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=462016#c11
--- Comment #11 from Steven Munroe <munroesj at us.ibm.com> 2009-01-02 09:35:12 MST ---
updated svn revision 122306 from 2008-12-31 12:45:17 without any patches and
gode simular but slightly different results:
mono/tests> gdb ../mini/mono
GNU gdb 6.6.50.20070726-cvs
Copyright (C) 2007 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "ppc-suse-linux"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) handle SIGXCPU SIG33 SIG35 SIGPWR nostop noprint
Signal Stop Print Pass to program Description
SIGXCPU No No Yes CPU time limit exceeded
SIGPWR No No Yes Power fail/restart
SIG33 No No Yes Real-time event 33
SIG35 No No Yes Real-time event 35
(gdb) set environment MONO_PATH ../../../mcs/class/lib/net_2_0
(gdb) set environment MONO_SHARED_DIR
/home/sjmunroe/src/mono-ppc/mono-svn/mono/runtime
(gdb) set environment MONO_CFG_DIR
/home/sjmunroe/src/mono-ppc/mono-svn/mono/runtime/etc
(gdb) run pinvoke2.exe
Starting program: /home/sjmunroe/src/mono-ppc/mono-svn/mono/mono/mini/mono
pinvoke2.exe
[Thread debugging using libthread_db enabled]
[New Thread 0xf7fb6210 (LWP 11723)]
[New Thread 0xf77a34a0 (LWP 11726)]
[New Thread 0xf77434a0 (LWP 11727)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xf7fb6210 (LWP 11723)]
0x100aeabc in mono_class_native_size (klass=0x103329e8, align=0xff9eb1e8)
at marshal.c:11596
11596 return klass->marshal_info->native_size;
(gdb) backtrace
#0 0x100aeabc in mono_class_native_size (klass=0x103329e8, align=0xff9eb1e8)
at marshal.c:11596
#1 0x10019bb8 in mono_allocate_stack_slots_full (cfg=0x10325200, backward=0,
stack_size=0xff9eb26c, stack_align=0xff9eb270) at mini.c:1630
#2 0x100a5d74 in mono_arch_allocate_vars (m=0x10325200) at mini-ppc.c:1252
#3 0x1001bd34 in mini_method_compile (method=0x103418b8, opts=271733152,
domain=0xf7e6bee0, run_cctors=270287412, compile_aot=1, parts=0)
at mini.c:3432
#4 0x1001c9d0 in mono_jit_compile_method (method=0x103418b8) at mini.c:3822
#5 0x10112660 in mono_compile_method (method=0x103329e8) at object.c:529
#6 0x1001c7f4 in mono_jit_compile_method (method=0x102efc40) at mini.c:3778
#7 0x10112660 in mono_compile_method (method=0x103329e8) at object.c:529
#8 0x10093b20 in mono_magic_trampoline (regs=0xff9eb45c,
code=0xf75d7300 "\200a", m=0x102efc40, tramp=<value optimized out>)
at mini-trampolines.c:292
#9 0xf7fc4114 in ?? ()
#10 0xf75d7300 in ?? ()
#11 0xf75f548c in ?? ()
#12 0x1001d20c in mono_jit_runtime_invoke (method=0xff9eb660, obj=0x0,
params=0x0, exc=0x0) at mini.c:4166
#13 0x10113a60 in mono_runtime_invoke (method=0x102efc60, obj=0x0, params=0x0,
exc=0x0) at object.c:2399
#14 0x10117078 in mono_runtime_invoke_array (method=0x102efc60, obj=0x0,
---Type <return> to continue, or q <return> to quit---
params=0x0, exc=0x0) at object.c:3490
#15 0x101363b8 in ves_icall_InternalInvoke (method=<value optimized out>,
this=0x0, params=0x0, exc=0xff9eb8fc) at icall.c:3056
#16 0xf75f53b0 in ?? ()
#17 0xf75f4e38 in ?? ()
#18 0xf75f4d14 in ?? ()
#19 0xf7ba5990 in ?? ()
#20 0xf7ba54d4 in ?? ()
#21 0xf7ba53a4 in ?? ()
#22 0x1001d20c in mono_jit_runtime_invoke (method=0xff9eb8d0, obj=0xf7631450,
params=0xf7630fc8, exc=0x0) at mini.c:4166
#23 0x10113a60 in mono_runtime_invoke (method=0x102a20a8, obj=0x0,
params=0xff9ebad8, exc=0x0) at object.c:2399
#24 0x1011a4fc in mono_runtime_exec_main (method=0x102a20a8,
args=<value optimized out>, exc=0x0) at object.c:3296
#25 0x1011bd24 in mono_runtime_run_main (method=0xf7633aa0, argc=1, argv=0x6,
exc=0x0) at object.c:3084
#26 0x10071b34 in mono_jit_exec (domain=<value optimized out>,
assembly=<value optimized out>, argc=1, argv=0xff9ebef8) at driver.c:921
#27 0x10073000 in mono_main (argc=2, argv=<value optimized out>)
at driver.c:969
#28 0x10013648 in main (argc=271788520, argv=0xff9eb1e8) at main.c:34
(gdb) print klass
$1 = (MonoClass *) 0x103329e8
(gdb) print klass->marshal_info
$2 = (MonoMarshalType *) 0x205de3f
(gdb) print klass->marshal_info->native_size
Cannot access memory at address 0x205de3f
(gdb) print *klass
$3 = {element_class = 0x10341480, cast_class = 0x102abac8, supertypes = 0x0,
idepth = 0, rank = 0 '\0', instance_size = 271731984, inited = 0,
init_pending = 0, size_inited = 0, valuetype = 0, enumtype = 0,
blittable = 0, unicode = 0, wastypebuilder = 0, min_align = 0 '\0',
packing_size = 0, ghcimpl = 0, has_finalize = 0, marshalbyref = 0,
contextbound = 1, delegate = 0, gc_descr_inited = 0, has_cctor = 0,
has_references = 0, has_static_refs = 0, no_special_static_fields = 0,
is_com_object = 0, nested_classes_inited = 1, simd_type = 0,
exception_type = 46 '.', parent = 0xf75fad28, nested_in = 0x0,
nested_classes = 0x205ddff, image = 0x1033d538, name = 0x1033790c
"\0203�8",
name_space = 0x0, enum_basetype = 0x2067aa7, declsec_flags = 271655408,
type_token = 4150252988, vtable_size = 0, interface_count = 518,
interface_id = 9278, max_interface_id = 4142,
interface_offsets_count = 60784, interfaces_packed = 0x10338cf0,
interface_offsets_packed = 0x0,
interface_bitmap = 0x205ddae <Address 0x205ddae out of bounds>,
interfaces = 0x102eef18, sizes = {class_size = 271818960,
element_size = 271818960, generic_param_token = 271818960}, flags = 0,
field = {first = 33938915, count = 271656400}, method = {first = 4150254356,
count = 0}, property = {first = 33957050, count = 271512056}, event = {
first = 4150253000, count = 0}, marshal_info = 0x205de3f,
fields = 0x10311f70, properties = 0xf75fad34, events = 0x0,
methods = 0x20623ee, this_arg = {data = {klass = 0xf75fad34,
---Type <return> to continue, or q <return> to quit---
type = 0xf75fad34, array = 0xf75fad34, method = 0xf75fad34,
generic_param = 0xf75fad34, generic_class = 0xf75fad34}, attrs = 4139,
type = 124, num_mods = 14, byref = 0, pinned = 0, modifiers = 0x10332a88},
byval_arg = {data = {klass = 0x0, type = 0x0, array = 0x0, method = 0x0,
generic_param = 0x0, generic_class = 0x0}, attrs = 63327, type = 173,
num_mods = 13, byref = 0, pinned = 0, modifiers = 0x10332a90},
generic_class = 0xf75fad40, generic_container = 0x102b80c8,
reflection_info = 0x0, gc_descr = 0xf75fad40, runtime_info = 0x10312028,
next_class_cache = 0xf75fad40, vtable = 0x0, field_def_values = 0x2062405}
(gdb) disassemble
Dump of assembler code for function mono_class_native_size:
0x100aea70 <mono_class_native_size+0>: mflr r0
0x100aea74 <mono_class_native_size+4>: stwu r1,-32(r1)
0x100aea78 <mono_class_native_size+8>: stw r30,24(r1)
0x100aea7c <mono_class_native_size+12>: stw r31,28(r1)
0x100aea80 <mono_class_native_size+16>: mr r30,r4
0x100aea84 <mono_class_native_size+20>: mr r31,r3
0x100aea88 <mono_class_native_size+24>: stw r29,20(r1)
0x100aea8c <mono_class_native_size+28>: stw r0,36(r1)
0x100aea90 <mono_class_native_size+32>: nop
0x100aea94 <mono_class_native_size+36>: nop
0x100aea98 <mono_class_native_size+40>: nop
0x100aea9c <mono_class_native_size+44>: lwz r29,132(r3)
0x100aeaa0 <mono_class_native_size+48>: cmpwi cr7,r29,0
0x100aeaa4 <mono_class_native_size+52>: beq- cr7,0x100aeadc
<mono_class_native_size+108>
0x100aeaa8 <mono_class_native_size+56>: cmpwi cr7,r30,0
0x100aeaac <mono_class_native_size+60>: beq- cr7,0x100aeab8
<mono_class_native_size+72>
0x100aeab0 <mono_class_native_size+64>: lbz r0,21(r31)
0x100aeab4 <mono_class_native_size+68>: stw r0,0(r30)
0x100aeab8 <mono_class_native_size+72>: lwz r9,132(r31)
0x100aeabc <mono_class_native_size+76>: lwz r3,0(r9)
---Type <return> to continue, or q <return> to quit---
0x100aeac0 <mono_class_native_size+80>: lwz r0,36(r1)
0x100aeac4 <mono_class_native_size+84>: lwz r29,20(r1)
0x100aeac8 <mono_class_native_size+88>: lwz r30,24(r1)
0x100aeacc <mono_class_native_size+92>: lwz r31,28(r1)
0x100aead0 <mono_class_native_size+96>: addi r1,r1,32
0x100aead4 <mono_class_native_size+100>: mtlr r0
0x100aead8 <mono_class_native_size+104>: blr
0x100aeadc <mono_class_native_size+108>: bl 0x100ae480
<mono_marshal_is_loading_type_info>
0x100aeae0 <mono_class_native_size+112>: cmpwi cr7,r3,0
0x100aeae4 <mono_class_native_size+116>: beq- cr7,0x100aeafc
<mono_class_native_size+140>
0x100aeae8 <mono_class_native_size+120>: cmpwi cr7,r30,0
0x100aeaec <mono_class_native_size+124>: li r3,0
0x100aeaf0 <mono_class_native_size+128>: beq+ cr7,0x100aeac0
<mono_class_native_size+80>
0x100aeaf4 <mono_class_native_size+132>: stw r29,0(r30)
0x100aeaf8 <mono_class_native_size+136>: b 0x100aeac0
<mono_class_native_size+80>
0x100aeafc <mono_class_native_size+140>: mr r3,r31
0x100aeb00 <mono_class_native_size+144>: bl 0x100ae550
<mono_marshal_load_type_info>
0x100aeb04 <mono_class_native_size+148>: b 0x100aeaa8
<mono_class_n---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) info reg r31
r31 0x103329e8 271788520
(gdb) info reg r9
r9 0x205de3f 33939007
(gdb)
In this case klass->marshal_info contained a bad value which caused a sigsegv
on the reference to klass->marshal_info->native_size.
This is consistent to cases where mono_class_native_size() is trying to access
fields of struct MonoClass but in actuality was passed an instance of
MonoGenericClass.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the mono-bugs
mailing list