[Mono-list] mcs 2.10.2 compiles fine, gmcs crashes

Tim Nelson nelson.timothy at gmail.com
Wed Dec 7 15:11:24 EST 2011


I have a simple Helloworld console app that compiles fine with mcs,
but gmcs crashes with:


Unknown errno: Bad address

WriteFile returned 31

Stacktrace:

  at (wrapper managed-to-native)
System.Reflection.Emit.ModuleBuilder.WriteToFile
(System.Reflection.Emit.ModuleBuilder,intptr) <0xffffffff>
  at System.Reflection.Emit.ModuleBuilder.Save () <0x0079f>
  at System.Reflection.Emit.AssemblyBuilder.Save
(string,System.Reflection.PortableExecutableKinds,System.Reflection.ImageFileMachine)
<0x00627>
  at Mono.CSharp.AssemblyDefinition.Save () <0x000e7>
  at Mono.CSharp.Driver.Compile () <0x005c7>
  at Mono.CSharp.Driver.Main (string[]) <0x000c3>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        /usr/local/bin/mono [0x492d0d]
        /lib64/libpthread.so.0 [0x30d3e0eb10]
        /lib64/libc.so.6(gsignal+0x35) [0x30d3230265]
        /lib64/libc.so.6(abort+0x110) [0x30d3231d10]
        /usr/local/bin/mono [0x5c1882]
        /usr/local/bin/mono [0x5c196f]
        /usr/local/bin/mono [0x52c26a]
        /usr/local/bin/mono [0x53efa6]
        [0x4146272c]

Debug info from gdb:

warning: no loadable sections found in added symbol-file
system-supplied DSO at 0x7fff941fc000
Mono support loaded.
[Thread debugging using libthread_db enabled]
[New Thread 0x41d1f940 (LWP 24300)]
0x00000030d3e0d91b in read () from /lib64/libpthread.so.0
  2 Thread 0x41d1f940 (LWP 24300)  0x00000030d3e0cd01 in sem_wait ()
from /lib64/libpthread.so.0
* 1 Thread 0x2b67cc627d40 (LWP 24299)  0x00000030d3e0d91b in read ()
from /lib64/libpthread.so.0

Thread 2 (Thread 0x41d1f940 (LWP 24300)):
#0  0x00000030d3e0cd01 in sem_wait () from /lib64/libpthread.so.0
#1  0x00000000005b4658 in mono_sem_wait (sem=0x8e6720, alertable=1) at
mono-semaphore.c:113
#2  0x0000000000580c9b in finalizer_thread (unused=<value optimized
out>) at gc.c:1066
#3  0x00000000004ffa35 in start_wrapper_internal (data=<value
optimized out>) at threads.c:782
#4  start_wrapper (data=<value optimized out>) at threads.c:830
#5  0x00000000005b42d3 in thread_start_routine (args=0x15f2b3a0) at
wthreads.c:285
#6  0x00000000005cd0b4 in GC_start_routine (arg=0x2aaaaad7afc0) at
pthread_support.c:1468
#7  0x00000030d3e0673d in start_thread () from /lib64/libpthread.so.0
#8  0x00000030d32d44bd in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x2b67cc627d40 (LWP 24299)):
#0  0x00000030d3e0d91b in read () from /lib64/libpthread.so.0
#1  0x0000000000492e0c in mono_handle_native_sigsegv (signal=<value
optimized out>, ctx=<value optimized out>)
    at mini-exceptions.c:2207
#2  <signal handler called>
#3  0x00000030d3230265 in raise () from /lib64/libc.so.6
#4  0x00000030d3231d10 in abort () from /lib64/libc.so.6
#5  0x00000000005c1882 in monoeg_g_logv (log_domain=0x0,
log_level=G_LOG_LEVEL_ERROR, format=0x63ee1c "WriteFile returned
%d\n",
    args=0x7fff9404a490) at goutput.c:134
#6  0x00000000005c196f in monoeg_g_log (log_domain=0x0,
log_level=G_LOG_LEVEL_ERROR, format=0x63ee1c "WriteFile returned
%d\n")
    at goutput.c:144
#7  0x000000000052c26a in checked_write_file (f=<value optimized out>,
buffer=<value optimized out>,
    numbytes=<value optimized out>) at reflection.c:5581
#8  0x000000000053efa6 in mono_image_create_pefile (mb=0x2aaaab2ff8c0,
file=0x4) at reflection.c:5882
#9  0x000000004146272c in ?? ()
#10 0x0000000015eca4b0 in ?? ()
#11 0x00002aaaab71ae58 in ?? ()
#12 0x00002aaaab2ff8c0 in ?? ()
#13 0x0000000000000001 in ?? ()
#14 0x00002aaaaad6ee60 in ?? ()
#15 0x00007fff9404a8b0 in ?? ()
#16 0x00007fff9404a6e0 in ?? ()
#17 0x00002aaaab71ae58 in ?? ()
#18 0x00002aaaab2ff8c0 in ?? ()
#19 0x0000000000000001 in ?? ()
#20 0x0000000000000001 in ?? ()
#21 0x00000000414618c0 in ?? ()
#22 0x006d006500640061 in ?? ()
#23 0x0073006b00720061 in ?? ()
#24 0x00002aaaab7c7c90 in ?? ()
#25 0x00002aaaab2ff8c0 in ?? ()
#26 0x00002aaaab2ff8c0 in ?? ()
#27 0x00002aaaab71ae58 in ?? ()
#28 0x0000000015eca4b1 in ?? ()
#29 0x00002b67cc627d10 in ?? ()
#30 0x0000000016616928 in ?? ()
#31 0x000000004145a258 in ?? ()
#32 0x00002aaaaad6ee60 in ?? ()
#33 0x00007fff9404a9d0 in ?? ()
#34 0x00007fff9404a8c0 in ?? ()
#35 0x00002aaaab71ae58 in ?? ()
#36 0x00002aaaab2ff8c0 in ?? ()
#37 0x0000000000000001 in ?? ()
#38 0x000000000000014c in ?? ()
#39 0x0000000000000000 in ?? ()

=================================================================
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-list mailing list