Bug 31996

Summary: AOT compiler fails if path to project has a comma
Product: iOS Reporter: Rolf Bjarne Kvinge [MSFT] <rolf>
Component: Mono runtime / AOT compilerAssignee: João Matos <joao.matos>
Severity: normal CC: kumpera, mono-bugs+monotouch
Priority: ---    
Version: master   
Target Milestone: Untriaged   
Hardware: PC   
OS: Mac OS   
Tags: Is this bug a regression?: ---
Last known good build:

Description Rolf Bjarne Kvinge [MSFT] 2015-07-16 04:18:58 UTC
* Create new iOS project using a path with a comma.
* Build project for device.

AOT compilation fails with:

> AOT Compilation exited with code 1, command:
> MONO_PATH=/Users/rolf/Projects/c,m,a/concomma/concomma/obj/iPhone/Debug/mtouch-cache/64/Build /work/maccore/xcode7/maccore/_build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/bin/arm64-darwin-mono-sgen --debug -O=gsharedvt -O=-float32  --aot=mtriple=arm64-ios,full,static,asmonly,direct-icalls,soft-debug,dwarfdebug,no-direct-calls,outfile="/Users/rolf/Projects/c,m,a/concomma/concomma/obj/iPhone/Debug/mtouch-cache/concomma.exe.arm64.s" "/Users/rolf/Projects/c,m,a/concomma/concomma/obj/iPhone/Debug/mtouch-cache/64/Build/concomma.exe"
> AOT : Unknown argument 'm'.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2015-07-16 04:23:49 UTC
The problem is that the AOT compiler uses g_strsplit to parse its arguments: https://github.com/mono/mono/blob/master/mono/mini/aot-compiler.c#L6549
Comment 2 Rolf Bjarne Kvinge [MSFT] 2015-07-16 04:26:22 UTC
Note: XI will quote paths/arguments to the AOT compiler that contains comma (maccore/3cd411db4428178db6b7577d33220e221dfd40ae), since otherwise there's no way for the AOT compiler to know if the comma means a new argument is coming or if it's in the path.
Comment 3 Rodrigo Kumpera 2015-07-16 12:01:36 UTC
Hi João,

Could you take a look at this one.
Comment 4 João Matos 2015-07-21 14:10:18 UTC
Should be fixed by https://github.com/mono/mono/commit/fc79543.