Bug 54683 - Path hygiene: Quote EVERYTHING
Summary: Path hygiene: Quote EVERYTHING
Alias: None
Product: Android
Classification: Xamarin
Component: MSBuild ()
Version: 5.1
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: dean.ellis
: 30362 55227 ()
Depends on:
Reported: 2017-04-07 01:07 UTC by Jonathan Pryor
Modified: 2017-07-27 10:58 UTC (History)
5 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 54683 on Developer Community or GitHub 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: Developer Community HTML or GitHub Markdown
  • 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 Jonathan Pryor 2017-04-07 01:07:40 UTC


TL;DR: Windows 8.3 filename aliases can be *disabled*, resulting in pain and suffering when AOT is enabled and we construct a command without proper quoting (on the assumption that GetShortPathName() will save us and return a value without spaces; no such luck!):

> "...\cross-arm" --llvm \
> --aot=outfile=D:\Projects\P4\Workspace\MyApp\MyApp.Universal.Droid\obj\Release\aot\armeabi\libaot-MyApp.Universal.Droid.dll.so,asmwriter,mtriple=armv5-linux-gnueabi,tool-prefix=C:\PROGRA~3\MICROS~1\AndroidNDK\android-ndk-r11c\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\bin\arm-linux-androideabi-,ld-flags=C:\PROGRA~3\MICROS~1\AndroidNDK\android-ndk-r11c\toolchains\arm-linux-androideabi-4.9\prebuilt\windows\lib\gcc\arm-linux-androideabi\4.9\libgcc.a;C:\PROGRA~3\MICROS~1\AndroidNDK\android-ndk-r11c\platforms\android-24\arch-arm\usr\lib\libc.so;C:\PROGRA~3\MICROS~1\AndroidNDK\android-ndk-r11c\platforms\android-24\arch-arm\usr\lib\libm.so,llvm-path=C:\PROGRA~2\Microsoft Visual Studio\2017\Community\MSBuild\Xamarin\Android,temp-path=D:\Projects\P4\Workspace\MyApp\MyApp.Universal.Droid\obj\Release\aot\armeabi\MyApp.Universal.Droid.dll \
> "D:\Projects\P4\Workspace\MyApp\MyApp.Universal.Droid\obj\Release\android\assets\MyApp.Universal.Droid.dll"

For the above command invocation, *some* values are quoted, e.g. the final `MyApp.Universal.Droid.dll` path, but not all; the --llvm option isn't quoted, nor is the *gigantic* --aot=... option.

For sanity -- *even if* the above ultimately "can't" work because 8.3 aliasing is disabled and the NDK thus gets installed into a directory containing spaces -- we should ensure that ALL command-line option values are QUOTED.

It's just good hygiene.
Comment 1 Jon Douglas [MSFT] 2017-04-14 19:22:43 UTC
*** Bug 55227 has been marked as a duplicate of this bug. ***
Comment 2 Jon Douglas [MSFT] 2017-06-28 16:39:50 UTC
*** Bug 30362 has been marked as a duplicate of this bug. ***