-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[wasi] Unescaped file paths when compiling with WasmSingleFileBundle
#84878
Comments
Tagging subscribers to 'arch-wasm': @lewing Issue DetailsDescriptionWhen compiling a Reproduction Steps
Expected behaviorProject compiles successfully Actual behaviorPerforming WASI SDK build: "C:\Users\jamagee\Downloads\wasi-sdk\bin\clang.exe" @C:\src\dotnet-wasi\obj\Debug\net8.0\wasi-wasm\wasm\for-build\clang-compile.rsp
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libicudata.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj] Full build log dotnet build
MSBuild version 17.7.0-preview-23206-02+171676d81 for .NET
Determining projects to restore...
All projects are up-to-date for restore.
C:\Program Files\dotnet\sdk\8.0.100-preview.4.23213.27\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.RuntimeIdentifierInference.targets(287,5): message NETSDK1057: You are using a preview version of .NET. See: https://aka.ms/dotnet-support-policy [C:\src\dotnet-wasi\dotnet-wasi.csproj]
dotnet-wasi -> C:\src\dotnet-wasi\bin\Debug\net8.0\wasi-wasm\dotnet-wasi.dll
MicrosoftNetCoreAppRuntimePackRidNativeDir: C:\Program Files\dotnet\packs\Microsoft.NETCore.App.Runtime.Mono.wasi-wasm\8.0.0-preview.4.23214.9\runtimes\wasi-wasm\native\
Performing WASI SDK build: "C:\Users\jamagee\Downloads\wasi-sdk\bin\clang.exe" @C:\src\dotnet-wasi\obj\Debug\net8.0\wasi-wasm\wasm\for-build\clang-compile.rsp
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libicudata.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libicui18n.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libicuuc.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-component-debugger-static.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-component-debugger-stub-static.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-component-diagnostics_tracing-stub-static.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-component-hot_reload-static.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-component-hot_reload-stub-static.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-component-marshal-ilgen-static.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-component-marshal-ilgen-stub-static.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-ee-interp.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-icall-table.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmonosgen-2.0.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libSystem.IO.Compression.Native.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libSystem.Native.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/wasm-bundled-timezones.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/src/driver.c' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/src/main.c' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/src/pinvoke.c' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/src/stubs.c' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/src/synthetic-pthread.c' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk\8.0.0-preview.4.23214.9\Sdk\WasiApp.Native.targets(440,5): error MSB3073: The command ""C:\Users\jamagee\Downloads\wasi-sdk\bin\clang.exe" @C:\src\dotnet-wasi\obj\Debug\net8.0\wasi-wasm\wasm\for-build\clang-compile.rsp" exited with co
de 1. [C:\src\dotnet-wasi\dotnet-wasi.csproj]
Build FAILED.
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libicudata.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libicui18n.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libicuuc.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-component-debugger-static.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-component-debugger-stub-static.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-component-diagnostics_tracing-stub-static.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-component-hot_reload-static.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-component-hot_reload-stub-static.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-component-marshal-ilgen-static.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-component-marshal-ilgen-stub-static.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-ee-interp.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmono-icall-table.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libmonosgen-2.0.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libSystem.IO.Compression.Native.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/libSystem.Native.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/wasm-bundled-timezones.a' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/src/driver.c' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/src/main.c' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/src/pinvoke.c' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/src/stubs.c' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'C:/Program' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
clang : error : no such file or directory: 'Files/dotnet/packs/Microsoft.NETCore.App.Runtime.Mono.wasi-wasm/8.0.0-preview.4.23214.9/runtimes/wasi-wasm/native/src/synthetic-pthread.c' [C:\src\dotnet-wasi\dotnet-wasi.csproj]
C:\Program Files\dotnet\packs\Microsoft.NET.Runtime.WebAssembly.Wasi.Sdk\8.0.0-preview.4.23214.9\Sdk\WasiApp.Native.targets(440,5): error MSB3073: The command ""C:\Users\jamagee\Downloads\wasi-sdk\bin\clang.exe" @C:\src\dotnet-wasi\obj\Debug\net8.0\wasi-wasm\wasm\for-build\clang-compile.rsp" exited with co
de 1. [C:\src\dotnet-wasi\dotnet-wasi.csproj]
0 Warning(s)
43 Error(s)
Time Elapsed 00:00:16.82
Regression?No response Known WorkaroundsNo response Configuration.NET 8.0.100-preview.4.23213.27 on Windows 11 x64 Other information
runtime/src/mono/wasi/build/WasiApp.Native.targets Lines 414 to 433 in a2c095e
Here's my full `clang-compile.rsp
|
Description
When compiling a
wasiconsole
app using thewasi-experimental
workload, file paths inclang-compile.rsp
aren't properly escaped.Reproduction Steps
dotnet new wasiconsole
dotnet build /p:WasmSingleFileBundle=true
Expected behavior
Project compiles successfully
Actual behavior
Full build log
Regression?
No response
Known Workarounds
No response
Configuration
.NET 8.0.100-preview.4.23213.27 on Windows 11 x64
Other information
clang-compile.rsp
arguments here need to be correctly escaped:runtime/src/mono/wasi/build/WasiApp.Native.targets
Lines 414 to 433 in a2c095e
Here's my full
clang-compile.rsp
`clang-compile.rsp
The text was updated successfully, but these errors were encountered: