Bug 5093 - MonoTouch AOT Compiler - large methods fail
Summary: MonoTouch AOT Compiler - large methods fail
Status: RESOLVED DUPLICATE of bug 9002
Alias: None
Product: iOS
Classification: Xamarin
Component: XI runtime ()
Version: 6.3.x
Hardware: Macintosh Mac OS
: High normal
Target Milestone: 7.2.0 (iOS 7.1)
Assignee: Bugzilla
Depends on:
Reported: 2012-05-15 12:20 UTC by Jonathan Peppers
Modified: 2014-03-19 13:03 UTC (History)
6 users (show)

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

Test project displaying the issue (1.50 MB, application/x-zip-compressed)
2012-05-15 12:20 UTC, Jonathan Peppers

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 Developer Community or GitHub 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 Jonathan Peppers 2012-05-15 12:20:34 UTC
Created attachment 1893 [details]
Test project displaying the issue

See stack overflow question here: http://stackoverflow.com/questions/10603981/monotouch-aot-compiler-large-methods-fail

I submitted an example project exhibiting the failure.  Compiling for the device gives the error:

MONO_PATH=/Users/jonathanpeppers/Desktop/DrawAStickman/Game/Code/iOS/DrawAStickman.iPhone/bin/iPhone/Release/DrawAStickmaniPhone.app /Developer/MonoTouch/usr/bin/arm-darwin-mono --aot=mtriple=armv7-darwin,full,static,asmonly,nodebug,outfile=/var/folders/4s/lcvdj54x0g72nrsw9vzq6nm80000gn/T/tmp54777849.tmp/monotouch.dll.7.s "/Users/jonathanpeppers/Desktop/DrawAStickman/Game/Code/iOS/DrawAStickman.iPhone/bin/iPhone/Release/DrawAStickmaniPhone.app/monotouch.dll"
AOT Compilation exited with code 134, command:
MONO_PATH=/Users/jonathanpeppers/Desktop/DrawAStickman/Game/Code/iOS/DrawAStickman.iPhone/bin/iPhone/Release/DrawAStickmaniPhone.app /Developer/MonoTouch/usr/bin/arm-darwin-mono --aot=mtriple=armv7-darwin,full,static,asmonly,nodebug,outfile=/var/folders/4s/lcvdj54x0g72nrsw9vzq6nm80000gn/T/tmp54777849.tmp/DrawAStickmanCore.dll.7.s "/Users/jonathanpeppers/Desktop/DrawAStickman/Game/Code/iOS/DrawAStickman.iPhone/bin/iPhone/Release/DrawAStickmaniPhone.app/DrawAStickmanCore.dll"
Mono Ahead of Time compiler - compiling assembly /Users/jonathanpeppers/Desktop/DrawAStickman/Game/Code/iOS/DrawAStickman.iPhone/bin/iPhone/Release/DrawAStickmaniPhone.app/DrawAStickmanCore.dll
* Assertion: should not be reached at ../../../../../mono/mono/mini/mini-arm.c:2758
Comment 1 Zoltan Varga 2012-05-17 18:52:47 UTC
Fixed in master/mobile-master.
Comment 2 Jonathan Peppers 2012-05-17 20:37:27 UTC
How long until a new build on the alpha/beta channel?
Comment 3 Jonathan Peppers 2012-06-29 17:31:18 UTC
I can compile the attached project in the 5.3.x beta, but not when the LLVM compiler option is turned on (I just tried ARMV6, not ARMV7).

Is this still an issue for LLVM?
Comment 6 Sebastien Pouliot 2013-05-31 11:31:08 UTC
I just tested the 2nd attachment using 6.3.x

/var/folders/gn/tktfcr8n5t5bhq1xcgc28l5w0000gn/T/tmp2aef004c.tmp/TestAOT.exe.armv7.s:157:branch out of range
/var/folders/gn/tktfcr8n5t5bhq1xcgc28l5w0000gn/T/tmp2aef004c.tmp/TestAOT.exe.armv7.s:152:branch out of range
/var/folders/gn/tktfcr8n5t5bhq1xcgc28l5w0000gn/T/tmp2aef004c.tmp/TestAOT.exe.armv7.s:141:branch out of range
/var/folders/gn/tktfcr8n5t5bhq1xcgc28l5w0000gn/T/tmp2aef004c.tmp/TestAOT.exe.armv7.s:130:branch out of range
/var/folders/gn/tktfcr8n5t5bhq1xcgc28l5w0000gn/T/tmp2aef004c.tmp/TestAOT.exe.armv7.s:130:FATAL:Section too large, can't encode r_address (0x33381b8) into 24-bits of scattered relocation entry

error MT3001: Could not AOT the assembly '/Users/poupou/Downloads/TestAOT/TestAOT/bin/iPhone/Release/TestAOT.exe'
Comment 7 Jonathan Peppers 2013-05-31 11:33:21 UTC
FYI we aren't waiting on this issue anymore (took a different approach), but yeah would be nice if methods of that size would work in MonoTouch.
Comment 10 PJ 2013-11-19 16:44:53 UTC
This bug was targeted for a past milestone, moving to the next non-hotfix active milestone.
Comment 11 Sebastien Pouliot 2014-03-19 13:03:29 UTC

*** This bug has been marked as a duplicate of bug 9002 ***