Bug 26346 - Full AOT crash: Instructions.cpp:281: void llvm::CallInst::init(llvm::Value *, ArrayRef<llvm::Value *>, const llvm::Twine &): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"
Summary: Full AOT crash: Instructions.cpp:281: void llvm::CallInst::init(llvm::Value *...
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: 3.8.0
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-01-23 09:58 UTC by KaptOc6obnuCac0Bluc+bugzilla.xamarin.com
Modified: 2015-02-19 12:55 UTC (History)
4 users (show)

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

Crashing dll (473.00 KB, application/octet-stream)
2015-01-23 10:00 UTC, KaptOc6obnuCac0Bluc+bugzilla.xamarin.com
Crash log (6.01 KB, text/x-log)
2015-01-23 10:01 UTC, KaptOc6obnuCac0Bluc+bugzilla.xamarin.com
F# Core (dependency) (1.32 MB, application/octet-stream)
2015-01-23 20:11 UTC, KaptOc6obnuCac0Bluc+bugzilla.xamarin.com

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:

Description KaptOc6obnuCac0Bluc+bugzilla.xamarin.com 2015-01-23 09:58:32 UTC
When I tried to `mono --llvm --aot=full FsCheck.dll` it crashes with

Mono Ahead of Time compiler - compiling assembly /tmp/FsCheck.dll
mono: Instructions.cpp:281: void llvm::CallInst::init(llvm::Value *, ArrayRef<llvm::Value *>, const llvm::Twine &): Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed.

The dll and the stacktrace are attached.

OS: Ubuntu 14.04 x86_64
Mono (rebuild from tpokorra repo using "./configure --prefix=/opt/mono --enable-llvm --with-llvm=/opt/mono --with-oprofile=/usr" in debian/rules and binary stripping also disabled):

Mono JIT compiler version 3.12.0 (tarball Tue Jan 20 14:22:39 CET 2015)
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:          yes(3.4svn-mono-/)
	GC:            sgen
Comment 1 KaptOc6obnuCac0Bluc+bugzilla.xamarin.com 2015-01-23 10:00:16 UTC
Created attachment 9469 [details]
Crashing dll
Comment 2 KaptOc6obnuCac0Bluc+bugzilla.xamarin.com 2015-01-23 10:01:03 UTC
Created attachment 9470 [details]
Crash log
Comment 3 Zoltan Varga 2015-01-23 19:52:56 UTC
Please attach the FsCheck.dll dependencies as well. Also note that --aot=full is intented for use on environments which don't allow JITting, it doesn't make too much sense on amd64.
Comment 4 KaptOc6obnuCac0Bluc+bugzilla.xamarin.com 2015-01-23 20:11:32 UTC
Created attachment 9482 [details]
F# Core (dependency)

FSharp.Core.dll is attached. This is the only known dependency for FsCheck.

FsCheck are also available in binary form:

FsCheck are also available in source form:
Comment 5 Zoltan Varga 2015-01-24 19:11:29 UTC
Fixed in mono master f342649f75bf13da8c1e14342a2dd69655add6e0.
Comment 7 Zoltan Varga 2015-02-19 11:01:03 UTC
The issue only happens with a 64 bit mono runtime, and we don't distribute that right now, so its kinda hard to reproduce without compiling one. I'd suggest treating this as verified.
Comment 8 KaptOc6obnuCac0Bluc+bugzilla.xamarin.com 2015-02-19 12:55:52 UTC
Well, the distribution about the 64bit mono runtime is more or less true - it would be good to have 64 bit runtime on 64 bit cpu.

Please note community builds are already available to everyone (it also support most linux distribution), and also listed on the Mono Project homepage.

Steps to reproduce on Ubuntu 14.04 x86_64:

1) Add tpokorra repo to your distribution, which is also available on Mono 
Project download page:


"Community packages"
  "Mono Packages installed to /opt for CentOS, Fedora, Debian and Ubuntu"

2) Download Fsharp.Core.dll (if you don't have F# already installed) and FsCheck.dll from the issue.

3) Execute the following command:

source /opt/mono/env.sh
mono --llvm --aot=full FsCheck.dll