Bug 48107 - AOT Compilation failed
Summary: AOT Compilation failed
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: JIT ()
Version: 4.6.0 (C8)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Zoltan Varga
URL:
Depends on:
Blocks:
 
Reported: 2016-11-27 14:07 UTC by su21
Modified: 2016-11-27 21:58 UTC (History)
4 users (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 su21 2016-11-27 14:07:17 UTC
```
mono --version
Mono JIT compiler version 4.6.2 (Stable 4.6.2.7/08fd525 Mon Nov 14 10:53:45 UTC 2016)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           __thread
	SIGSEGV:       altstack
	Notifications: epoll
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug
	LLVM:          supported, not enabled.
	GC:            sgen
```

```
cat main.cs
using System;

public class HelloWorld
{
    static public void Main ()
    {
        Console.WriteLine ("Hello Mono World");
    }
}
```

```
mcs main.cs
mono --aot main.ext
Mono Ahead of Time compiler - compiling assembly /home/supei/csharp/HelloWorld/main.exe
AOTID 3F301184-96D4-6C73-D3ED-1B23FB93B2B4
Code: 30(6%) Info: 5(1%) Ex Info: 24(5%) Unwind Info: 17(3%) Class Info: 30(6%) PLT: 10(2%) GOT Info: 244(52%) Offsets: 107(22%) GOT: 136
Compiled: 2/2 (100%), No GOT slots: 1 (50%), Direct calls: 0 (100%)
Executing the native assembler: "as" --64  -o /tmp/mono_aot_i2Qi38.o /tmp/mono_aot_i2Qi38
Executing the native linker: "ld"  -shared -o /home/supei/csharp/HelloWorld/main.exe.so.tmp  /tmp/mono_aot_i2Qi38.o
JIT time: 0 ms, Generation time: 0 ms, Assembly+Link time: 8 ms.
ghashtable.c:549: assertion 'hash != NULL' failed
```
Comment 1 su21 2016-11-27 14:08:47 UTC
platform info:
uname -a
Linux localhost.localdomain 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
Comment 2 su21 2016-11-27 14:12:08 UTC
more detail output:


mono --aot --verbose  main.exe
Mono Ahead of Time compiler - compiling assembly /home/supei/csharp/HelloWorld/main.exe
AOTID A9E04E7A-AC3F-C25A-6CD6-501FEEE40808
converting method void HelloWorld:.ctor ()
Method void HelloWorld:.ctor () emitted at 0x41e12b90 to 0x41e12b99 (code length 9) [main.exe] with opts peephole,branch,inline,cfold,consprop,copyprop,deadce,linears,cmov,intrins,loop,fcmov,aot,exception,gshared,simd,alias-analysis
converting method void HelloWorld:Main ()
Method void HelloWorld:Main () emitted at 0x41e12ba0 to 0x41e12bb5 (code length 21) [main.exe] with opts peephole,branch,inline,cfold,consprop,copyprop,deadce,linears,cmov,intrins,loop,fcmov,aot,exception,gshared,simd,alias-analysis
Method void HelloWorld:.ctor () emitted as .Lm_0
Method void HelloWorld:Main () emitted as .Lm_1
Code: 30(6%) Info: 5(1%) Ex Info: 24(5%) Unwind Info: 17(3%) Class Info: 30(6%) PLT: 10(2%) GOT Info: 244(52%) Offsets: 107(22%) GOT: 136
Compiled: 2/2 (100%), No GOT slots: 1 (50%), Direct calls: 0 (100%)
Executing the native assembler: "as" --64  -o /tmp/mono_aot_DXl9GV.o /tmp/mono_aot_DXl9GV
Executing the native linker: "ld"  -shared -o /home/supei/csharp/HelloWorld/main.exe.so.tmp  /tmp/mono_aot_DXl9GV.o
JIT time: 0 ms, Generation time: 0 ms, Assembly+Link time: 8 ms.
ghashtable.c:549: assertion 'hash != NULL' failed
Comment 3 Zoltan Varga 2016-11-27 21:58:59 UTC
That is just a warning which is already fixed in mono master/4.8.