[Mono-bugs] [Bug 80297][Blo] New - SIGABRT when using EnumBuilder in Reflection.Emit

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Mon Dec 18 04:51:32 EST 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by rolfkvinge at ya.com.

http://bugzilla.ximian.com/show_bug.cgi?id=80297

--- shadow/80297	2006-12-18 04:51:32.000000000 -0500
+++ shadow/80297.tmp.4210	2006-12-18 04:51:32.000000000 -0500
@@ -0,0 +1,168 @@
+Bug#: 80297
+Product: Mono: Class Libraries
+Version: 1.0
+OS: other
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Blocker
+Component: CORLIB
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: rolfkvinge at ya.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: SIGABRT when using EnumBuilder in Reflection.Emit
+
+Repro code and stack trace follows.
+This is currently a blocker for vbnc.
+
+using System;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Reflection.Emit;
+using System.Text;
+
+
+class vbnc_bugs
+{
+	static void Main (string [] args)
+	{
+		AppDomain domain = AppDomain.CurrentDomain;
+		AssemblyName name = new AssemblyName ("test");
+		AssemblyBuilder assembly = domain.DefineDynamicAssembly (name, 
+AssemblyBuilderAccess.RunAndSave);
+		ModuleBuilder module = assembly.DefineDynamicModule ("module");
+		TypeBuilder T = module.DefineType ("AType");
+		EnumBuilder E = module.DefineEnum ("AnEnum", 
+TypeAttributes.Public, typeof(int));
+		MethodBuilder method = T.DefineMethod("Method", 
+MethodAttributes.Public);
+		ILGenerator il = method.GetILGenerator ();
+		il.Emit (OpCodes.Box, E);
+		
+		Console.WriteLine ("SUCCESS");
+	}
+}
+
+
+
+** ERROR **: requested token for EnumBuilder
+
+aborting...
+Stacktrace:
+
+  at (wrapper managed-to-native) 
+System.Reflection.Emit.ModuleBuilder.getToken 
+(System.Reflection.Emit.ModuleBuilder,object) <0x00004>
+  at (wrapper managed-to-native) 
+System.Reflection.Emit.ModuleBuilder.getToken 
+(System.Reflection.Emit.ModuleBuilder,object) <0xffffffff>
+  at System.Reflection.Emit.ModuleBuilder.GetToken 
+(System.Reflection.MemberInfo) <0x0000d>
+  at System.Reflection.Emit.ModuleBuilderTokenGenerator.GetToken 
+(System.Reflection.MemberInfo) <0x00016>
+  at System.Reflection.Emit.ILGenerator.Emit 
+(System.Reflection.Emit.OpCode,System.Type) <0x00042>
+  at vbnc_bugs.Main (string[]) <0x000fd>
+  at (wrapper runtime-invoke) 
+System.Object.runtime_invoke_void_string[] (object,intptr,intptr,intptr) <0xffffffff>
+
+Native stacktrace:
+
+        mono(mono_handle_native_sigsegv+0xd4) [0x8168dd4]
+        [0xffffe440]
+        /lib/libc.so.6(abort+0x103) [0xb7dccfa3]
+        /opt/gnome/lib/libglib-2.0.so.0(g_logv+0x46d) [0xb7f2e1bd]
+        /opt/gnome/lib/libglib-2.0.so.0(g_log+0x35) [0xb7f2e205]
+        mono(mono_image_create_token+0xfa7) [0x80cea07]
+        mono [0x80ea8f8]
+        [0xb7a255c2]
+        [0xb7a2557e]
+        [0xb7a25557]
+        [0xb7a2522b]
+        [0xb7a1b64e]
+        [0xb7a19063]
+        mono(mono_runtime_exec_main+0x62) [0x80e2be2]
+        mono(mono_runtime_run_main+0x1b9) [0x80e2ec9]
+        mono(mono_main+0xe5a) [0x805ef4a]
+        mono [0x805dbe2]
+        /lib/libc.so.6(__libc_start_main+0xdc) [0xb7db887c]
+        mono [0x805db31]
+
+Debug info from gdb:
+
+Using host libthread_db library "/lib/libthread_db.so.1".
+[Thread debugging using libthread_db enabled]
+[New Thread -1210439360 (LWP 9263)]
+[New Thread -1219810400 (LWP 9265)]
+[New Thread -1208403040 (LWP 9264)]
+0xffffe410 in __kernel_vsyscall ()
+  3 Thread -1208403040 (LWP 9264)  0xffffe410 in __kernel_vsyscall ()
+  2 Thread -1219810400 (LWP 9265)  0xffffe410 in __kernel_vsyscall ()
+  1 Thread -1210439360 (LWP 9263)  0xffffe410 in __kernel_vsyscall ()
+
+Thread 3 (Thread -1208403040 (LWP 9264)):
+#0  0xffffe410 in __kernel_vsyscall ()
+#1  0xb7ef4a46 in __nanosleep_nocancel () from /lib/libpthread.so.0
+#2  0x0810a0e4 in collection_thread (unused=0x0) at collection.c:34
+#3  0xb7eee2ab in start_thread () from /lib/libpthread.so.0
+#4  0xb7e6075e in clone () from /lib/libc.so.6
+
+Thread 2 (Thread -1219810400 (LWP 9265)):
+#0  0xffffe410 in __kernel_vsyscall ()
+#1  0xb7ef1726 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/
+libpthread.so.0
+#2  0x081145af in timedwait_signal_poll_cond (cond=0xb798c1dc,
+    mutex=0xb798c1c4, timeout=0x0, alertable=0) at handles.c:1413
+#3  0x08116d6f in _wapi_handle_timedwait_signal_handle (handle=0x404,
+    timeout=0x0, alertable=0) at handles.c:1493
+#4  0x08116dec in _wapi_handle_wait_signal_handle (handle=0x404, 
+alertable=0)
+    at handles.c:1453
+#5  0x08117aff in WaitForSingleObjectEx (handle=0x404, timeout=4294967295,
+    alertable=0) at wait.c:200
+#6  0x0816fbba in finalizer_thread (unused=0x0) at gc.c:819
+#7  0x080bd924 in start_wrapper (data=0x8250020) at threads.c:313
+#8  0x0810e7ae in thread_start_routine (args=0xb783a238) at threads.c:253
+#9  0x08126e95 in GC_start_routine (arg=0x22f40) at pthread_support.c:1357
+#10 0xb7eee2ab in start_thread () from /lib/libpthread.so.0
+#11 0xb7e6075e in clone () from /lib/libc.so.6
+
+Thread 1 (Thread -1210439360 (LWP 9263)):
+#0  0xffffe410 in __kernel_vsyscall ()
+#1  0xb7e59e11 in ___newselect_nocancel () from /lib/libc.so.6
+#2  0xb7f4f9a0 in g_spawn_sync () from /opt/gnome/lib/libglib-2.0.so.0
+#3  0xb7f4fd6c in g_spawn_command_line_sync ()
+   from /opt/gnome/lib/libglib-2.0.so.0
+#4  0x08168e6c in mono_handle_native_sigsegv (signal=6, ctx=0xbfad364c)
+    at mini-exceptions.c:1058
+#5  <signal handler called>
+#6  0xffffe410 in __kernel_vsyscall ()
+#7  0xb7dcb8d0 in raise () from /lib/libc.so.6
+#8  0xb7dccfa3 in abort () from /lib/libc.so.6
+#9  0xb7f2e1bd in g_logv () from /opt/gnome/lib/libglib-2.0.so.0
+#10 0xb7f2e205 in g_log () from /opt/gnome/lib/libglib-2.0.so.0
+#11 0x080cea07 in mono_image_create_token (assembly=0x4c000, obj=0x51f60,
+    create_methodspec=1) at reflection.c:4278
+#12 0x080ea8f8 in ves_icall_ModuleBuilder_getToken (mb=0x4ef80, 
+obj=0x51f60)
+    at icall.c:939
+#13 0xb7a255c2 in ?? ()
+#14 0x0004ef80 in ?? ()
+#15 0x00051f60 in ?? ()
+#16 0x0820f3d8 in ?? ()
+#17 0x0000008c in ?? ()
+#18 0x00000000 in ?? ()
+#0  0xffffe410 in __kernel_vsyscall ()
+
+
+=================================================================
+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


More information about the mono-bugs mailing list