Bug 30090 - AOT compiler on OSX crashes with F# compiler and -O=all
Summary: AOT compiler on OSX crashes with F# compiler and -O=all
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: 3.12.0
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-05-14 14:40 UTC by Rodrigo Kumpera
Modified: 2018-04-05 22:39 UTC (History)
3 users (show)

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 for Bug 30090 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Rodrigo Kumpera 2015-05-14 14:40:56 UTC
With system mono 3.12:

mono --aot -O=all  /Library/Frameworks/Mono.framework//Versions/4.0.0/lib/mono/gac/FSharp.Compiler/

It crashes with:
	0   mono                                0x00198e06 mono_handle_native_sigsegv + 342
	1   mono                                0x001ec24a sigabrt_signal_handler + 122
	2   libsystem_platform.dylib            0x90e59deb _sigtramp + 43
	3   ???                                 0xffffffff 0x0 + 4294967295
	4   libsystem_c.dylib                   0x9b47029c abort + 155
	5   mono                                0x0033a6b1 monoeg_log_default_handler + 129
	6   mono                                0x0033a7ab monoeg_assertion_message + 107
	7   mono                                0x001e0c2f mono_arch_output_basic_block + 44111
	8   mono                                0x000e6b05 mono_codegen + 277
	9   mono                                0x000e9110 mini_method_compile + 7296
	10  mono                                0x0017dd31 compile_method + 273
	11  mono                                0x0016d22c mono_compile_assembly + 6284
	12  mono                                0x00165f5d mono_main + 7741
	13  mono                                0x000e0ef0 main + 768
	14  mono                                0x000e0be5 start + 53

Workaround: Don't use -O=all.
Comment 1 Ludovic Henry 2018-04-05 22:39:17 UTC
I have the following error when running with Mono (master/df33c092de3):

> $> MONO_GAC_PREFIX=/Library/Frameworks/Mono.framework/Versions/4.0.0 mono --aot -O=all /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/mono/gac/FSharp.Compiler/                                                                                                                                                                                                            1 ↵
> Mono Ahead of Time compiler - compiling assembly /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/mono/gac/FSharp.Compiler/
> AOTID 4E8F49CD-6B03-008E-2637-8C563790DD19
> Code: 8315057(72%) Info: 460214(3%) Ex Info: 1318002(11%) Unwind Info: 17260(0%) Class Info: 325109(2%) PLT: 257630(2%) GOT Info: 576145(5%) Offsets: 248472(2%) GOT: 486336
> Compiled: 51203/51203 (100%), No GOT slots: 30744 (60%), Direct calls: 0 (0%)
> Executing the native assembler: "clang"  -c -x assembler -o /var/folders/28/lw66k7_x64s1s586snmlbn880000gn/T/mono_aot_UXvoVJ.o /var/folders/28/lw66k7_x64s1s586snmlbn880000gn/T/mono_aot_UXvoVJ
> Executing the native linker: clang --shared -o /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/mono/gac/FSharp.Compiler/  /var/folders/28/lw66k7_x64s1s586snmlbn880000gn/T/mono_aot_UXvoVJ.o
> ld: can't open output file for writing '/Library/Frameworks/Mono.framework/Versions/4.0.0/lib/mono/gac/FSharp.Compiler/', errno=13 for architecture x86_64
> clang: error: linker command failed with exit code 1 (use -v to see invocation)
> AOT of image /Library/Frameworks/Mono.framework/Versions/4.0.0/lib/mono/gac/FSharp.Compiler/ failed.

You can download Mono 4.0.0 from https://download.mono-project.com/archive/4.0.0/macos-10-x86/MonoFramework-MDK-