[Mono-bugs] [Bug 424077] New: compute_class_bitmap when using Reflection

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Sep 6 21:51:20 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=424077


           Summary: compute_class_bitmap when using Reflection
           Product: Mono: Runtime
           Version: SVN
          Platform: x86-64
        OS/Version: openSUSE 11.0
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: generics
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: jpryor at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Mono version: svn-trunk r112036.

Sorry for the bad reproduction case; I lack the time to make it shorter.

Short version: When I build Mono.Rocks.dll and run monodocer on it, I crash the
runtime.

Longer version:

1. Save the attached Maybe.cs file.
2. Compile: gmcs -t:library Maybe.cs
3. Document: monodocer Maybe.dll -path:en -assembly:Maybe.dll

You might not have svn-trunk of monodocer, and you don't need it; it'll crash
if you use svn-trunk of mono against your system monodocer.  It'll even crash
if you use your system mono+monodocer (1.9.1 on openSUSE 11.0).

The generated crash:

jon at lina:tmp$ mono /usr/lib/monodoc/monodocer.exe Maybe.dll -path:en
-assembly:Maybe.dll
Updating: Mono.Rocks.Maybe
New Type: Mono.Rocks.Maybe`1
Member Added: public Maybe (T value);
Member Added: public bool Equals (Mono.Rocks.Maybe<T> obj);
Member Added: public T GetValueOrDefault ();
Member Added: public T GetValueOrDefault (T defaultValue);
Member Added: public bool HasValue { get; }
**
** ERROR:(object.c:683):compute_class_bitmap: code should not be reached
Stacktrace:

  at (wrapper managed-to-native) System.Reflection.MonoField.GetValueInternal
(object) <0x00048>
  at (wrapper managed-to-native) System.Reflection.MonoField.GetValueInternal
(object) <0xffffffff>
  at System.Reflection.MonoField.GetValue (object) <0x0002f>
  at CSharpFullMemberFormatter.AppendFieldValue
(System.Text.StringBuilder,System.Reflection.FieldInfo) <0x00095>
  at CSharpFullMemberFormatter.GetFieldDeclaration
(System.Reflection.FieldInfo) <0x001df>
  at MemberFormatter.GetDeclaration (System.Reflection.MemberInfo) <0x001f7>
  at Stub.MakeMemberSignature (System.Reflection.MemberInfo) <0x00023>
  at Stub.DoUpdateType2
(string,System.Xml.XmlDocument,System.Type,string,bool,System.Xml.XmlReader)
<0x00767>
  at Stub.StubType (System.Type,string,System.Xml.XmlReader) <0x000a3>
  at Stub.DoUpdateType (System.Type,string,string,System.Xml.XmlReader)
<0x00377>
  at Stub.DoUpdateAssembly
(System.Reflection.Assembly,System.Xml.XmlElement,string,string,System.Collections.Hashtable)
<0x000cf>
  at Stub.DoUpdateAssemblies (string,string) <0x00277>
  at Stub.Main (string[]) <0x00663>
  at (wrapper runtime-invoke) Stub.runtime_invoke_void_string[]
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono [0x42b6de]
        /lib64/libpthread.so.0 [0x7f56065a7b30]
        /lib64/libc.so.6(gsignal+0x35) [0x7f560601c5c5]
        /lib64/libc.so.6(abort+0x183) [0x7f560601dbb3]
        /usr/lib64/libglib-2.0.so.0(g_assertion_message+0x117) [0x7f5606e4a2a7]
        mono [0x4fdcef]
        mono [0x4fdf9a]
        mono(mono_class_vtable+0x1fe) [0x4fe99e]
        mono [0x49f774]
        [0x411cb228]

Debug info from gdb:

[Thread debugging using libthread_db enabled]
[New Thread 0x7f56074a7730 (LWP 31932)]
[New Thread 0x404e7950 (LWP 31934)]
[New Thread 0x419f9950 (LWP 31933)]
0x00007f56065a690b in read () from /lib64/libpthread.so.0
  3 Thread 0x419f9950 (LWP 31933)  0x00007f56065a7251 in nanosleep ()
   from /lib64/libpthread.so.0
  2 Thread 0x404e7950 (LWP 31934)  0x00007f56065a3dd9 in
pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  1 Thread 0x7f56074a7730 (LWP 31932)  0x00007f56065a690b in read ()
   from /lib64/libpthread.so.0

Thread 3 (Thread 0x419f9950 (LWP 31933)):
#0  0x00007f56065a7251 in nanosleep () from /lib64/libpthread.so.0
#1  0x00000000005272a2 in collection_thread (unused=<value optimized out>)
    at collection.c:34
#2  0x00007f56065a0040 in start_thread () from /lib64/libpthread.so.0
#3  0x00007f56060bd0cd in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x404e7950 (LWP 31934)):
#0  0x00007f56065a3dd9 in pthread_cond_wait@@GLIBC_2.3.2 ()
   from /lib64/libpthread.so.0
#1  0x000000000051c735 in timedwait_signal_poll_cond (cond=0x92cfd8, 
    mutex=0x92cfb0, timeout=0x1, alertable=-1) at handles.c:1490
#2  0x000000000051ee5f in _wapi_handle_timedwait_signal_handle (
    handle=<value optimized out>, timeout=0x0, alertable=9621424)
    at handles.c:1570
#3  0x0000000000511d6d in WaitForSingleObjectEx (handle=0x404, 
    timeout=4294967295, alertable=0) at wait.c:205
#4  0x00000000004e29a3 in finalizer_thread (unused=<value optimized out>)
    at gc.c:908
#5  0x00000000004c3403 in start_wrapper (data=<value optimized out>)
    at threads.c:621
#6  0x000000000052004b in thread_start_routine (args=0x92d308) at threads.c:279
#7  0x0000000000536252 in GC_start_routine (arg=<value optimized out>)
    at pthread_support.c:1382
#8  0x00007f56065a0040 in start_thread () from /lib64/libpthread.so.0
#9  0x00007f56060bd0cd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f56074a7730 (LWP 31932)):
#0  0x00007f56065a690b in read () from /lib64/libpthread.so.0
#1  0x000000000042b7d4 in mono_handle_native_sigsegv (
    signal=<value optimized out>, ctx=<value optimized out>)
    at mini-exceptions.c:1324
#2  <signal handler called>
#3  0x00007f560601c5c5 in raise () from /lib64/libc.so.6
#4  0x00007f560601dbb3 in abort () from /lib64/libc.so.6
#5  0x00007f5606e4a2a7 in g_assertion_message ()
   from /usr/lib64/libglib-2.0.so.0
#6  0x00000000004fdcef in compute_class_bitmap (class=0xb5d9a8, 
    bitmap=0x7fff0f4cf2d0, size=256, offset=0, max_set=0x7fff0f4cf2fc, 
    static_fields=0) at object.c:683
#7  0x00000000004fdf9a in mono_class_compute_gc_descriptor (class=0xb5d9a8)
    at object.c:908
#8  0x00000000004fe99e in mono_class_vtable (domain=0x7f5607368e00, 
    class=0xb5d9a8) at object.c:1415
#9  0x000000000049f774 in ves_icall_MonoField_GetValueInternal (
    field=<value optimized out>, obj=0x0) at icall.c:1670
#10 0x00000000411cb228 in ?? ()
#11 0x00000000008f7390 in ?? ()
#12 0x00000000008f7390 in ?? ()
#13 0x00007f5604d74968 in ?? ()
#14 0x00007f5604e3dcc0 in ?? ()
#15 0x00007f5604d76d10 in ?? ()
#16 0x00007fff0f4cf840 in ?? ()
#17 0x00007fff0f4cf420 in ?? ()
#18 0x00007f5604d74968 in ?? ()
#19 0x00007f5604e3dcc0 in ?? ()
#20 0x00007f5604d74968 in ?? ()
#21 0x0000000000000000 in ?? ()
#0  0x00007f56065a690b in read () from /lib64/libpthread.so.0

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

Aborted


-- 
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.


More information about the mono-bugs mailing list