Bug 45136 - Assert in SRE during Boo compiler run with latest master
Summary: Assert in SRE during Boo compiler run with latest master
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: Reflection ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2016-10-06 20:21 UTC by Jonathan Chambers
Modified: 2016-10-07 12:28 UTC (History)
1 user (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Jonathan Chambers 2016-10-06 20:21:28 UTC
Using latest master version of Mono I hit the following assert:

* Assertion: should not be reached at sre-save.c:1749

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.Emit.ModuleBuilder.build_metadata (System.Reflection.Emit.ModuleBuilder) <0x00058>
  at System.Reflection.Emit.ModuleBuilder.Save () <0x006ee>
  at System.Reflection.Emit.AssemblyBuilder.Save (string,System.Reflection.PortableExecutableKinds,System.Reflection.ImageFileMachine) <0x006f1>
  at System.Reflection.Emit.AssemblyBuilder.Save (string) <0x0001b>
  at Boo.Lang.Compiler.Steps.SaveAssembly.Save (System.Reflection.Emit.AssemblyBuilder,string) <0x00135>
  at Boo.Lang.Compiler.Steps.SaveAssembly.Run () <0x00097>
  at Boo.Lang.Compiler.CompilerPipeline.RunStep (Boo.Lang.Compiler.CompilerContext,Boo.Lang.Compiler.ICompilerStep) <0x000dd>
  at Boo.Lang.Compiler.CompilerPipeline.RunSteps (Boo.Lang.Compiler.CompilerContext) <0x0007f>
  at Boo.Lang.Compiler.CompilerPipeline/<>c__DisplayClass1.<Run>b__0 () <0x0005c>
  at Boo.Lang.Environments.ActiveEnvironment.With (Boo.Lang.Environments.IEnvironment,Boo.Lang.Procedure) <0x00059>
  at Boo.Lang.Compiler.CompilerPipeline.Run (Boo.Lang.Compiler.CompilerContext) <0x00172>
  at Boo.Lang.Compiler.BooCompiler.Run (Boo.Lang.Compiler.Ast.CompileUnit) <0x000d2>
  at Boo.Lang.Compiler.BooCompiler.Run () <0x0004e>
  at booc.App.Run (string[]) <0x002a8>
  at booc.App.AppRun (string[]) <0x00037>
  at booc.App.Main (string[]) <0x0005f>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_int_object (object,intptr,intptr,intptr) <0x00112>

Native stacktrace:

	0   mono                                0x0000000109da3620 mono_handle_native_sigsegv + 320
	1   mono                                0x0000000109e734de sigabrt_signal_handler + 158
	2   libsystem_platform.dylib            0x00007fff8e6a052a _sigtramp + 26
	3   mono                                0x000000010a1f4653 tmp_dir + 5355
	4   libsystem_c.dylib                   0x00007fff844e16df abort + 129
	5   mono                                0x000000010a0762f3 mono_log_write_logfile + 419
	6   mono                                0x000000010a06c32c structured_log_adapter + 60
	7   mono                                0x000000010a09ddcd monoeg_g_logv + 109
	8   mono                                0x000000010a09e1b4 monoeg_assertion_message + 356
	9   mono                                0x0000000109fbee83 fixup_method + 1523
	10  mono                                0x0000000109f98046 mono_g_hash_table_foreach + 246
	11  mono                                0x0000000109fbc32a mono_image_build_metadata + 1850
	12  mono                                0x0000000109fb5cec ves_icall_ModuleBuilder_build_metadata + 28
	13  ???                                 0x000000010ff58d39 0x0 + 4562718009
	14  mscorlib.dll.dylib                  0x000000010c87c032 System_Reflection_Emit_AssemblyBuilder_Save_string_System_Reflection_PortableExecutableKinds_System_Reflection_ImageFileMachine + 1778
	15  mscorlib.dll.dylib                  0x000000010c87c1ac System_Reflection_Emit_AssemblyBuilder_Save_string + 28
	16  ???                                 0x000000010d9b3390 0x0 + 4523242384
	17  ???                                 0x000000010d9b31dd 0x0 + 4523241949
	18  ???                                 0x000000010d9b313a 0x0 + 4523241786
	19  ???                                 0x000000010d9b3093 0x0 + 4523241619
	20  ???                                 0x000000010af3a388 0x0 + 4478706568
	21  mono                                0x0000000109c8751d mono_jit_runtime_invoke + 2493
	22  mono                                0x0000000109f9f066 do_runtime_invoke + 182
	23  mono                                0x0000000109f98e57 mono_runtime_invoke_checked + 103
	24  mono                                0x0000000109fa3096 do_exec_main_checked + 182
	25  mono                                0x0000000109fa1ab2 mono_runtime_exec_main_checked + 66
	26  mono                                0x0000000109fa1b05 mono_runtime_run_main_checked + 69
	27  mono                                0x0000000109d5c923 mono_jit_exec + 403
	28  mono                                0x0000000109d6042a main_thread_handler + 538
	29  mono                                0x0000000109d5edb3 mono_main + 7923
	30  mono                                0x0000000109c7216e mono_main_with_options + 46
	31  mono                                0x0000000109c718bd main + 77
	32  libdyld.dylib                       0x00007fff82fe55ad start + 1

Repro Steps:

Clone Boo from: git@github.com:Unity-Technologies/boo.git boo
cd boo
xbuild /t:Rebuild src/booc/booc.csproj
mono bin/booc.exe -debug- -out:bin/Boo.Lang.Extensions.dll -noconfig -nostdlib -srcdir:src/Boo.Lang.Extensions -r:System.dll -r:System.Core.dll -r:mscorlib.dll -r:Boo.Lang.dll -r:Boo.Lang.Compiler.dll
Comment 1 Jonathan Chambers 2016-10-07 12:28:49 UTC
This was fixed by https://github.com/mono/mono/commit/cb17a4f8fd6b861deeef6d612a7d500a907bed37