dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.15k stars 4.71k forks source link

[wasi] AOT broken in llvm 19 #108020

Open radekdoulik opened 1 month ago

radekdoulik commented 1 month ago

The library AOT smoke tests and 2 WBT tests are broken after updating to newer llvm 19 (rc2 .. rc4)

Example of the crashes:

  [Release_j21aevt4_rp2] [MONO] error: * Assertion at /__w/1/s/src/mono/mono/metadata/assembly.c:1306, condition `is_ok (error)' not met, function:invoke_assembly_preload_hook, Allocation failed. assembly:<unknown assembly> type:<unknown type> member:(null)
radekdoulik commented 4 days ago

Tried to use ASAN on wasi today. The wasi-sdk's clang doesn't support it.

error : Failed to compile /Users/rodo/git/runtime/artifacts/obj/Invariant.Tests/Release/net10.0/wasi-wasm/wasm/for-publish/Invariant.Tests.dll.bc -> /Users/rodo/git/runtime/artifacts/obj/Invariant.Tests/Release/net10.0/wasi-wasm/wasm/for-publish/Invariant.Tests.dll.o [/Users/rodo/git/runtime/src/libraries/System.Runtime/tests/System.Globalization.Tests/Invariant/Invariant.Tests.csproj]
error : clang version 18.1.2-wasi-sdk (https://github.com/llvm/llvm-project 26a1d6601d727a96f4301d0d8647b5a42760ae0c) [/Users/rodo/git/runtime/src/libraries/System.Runtime/tests/System.Globalization.Tests/Invariant/Invariant.Tests.csproj]
error : Target: wasm32-unknown-wasip2 [/Users/rodo/git/runtime/src/libraries/System.Runtime/tests/System.Globalization.Tests/Invariant/Invariant.Tests.csproj]
error : Thread model: posix [/Users/rodo/git/runtime/src/libraries/System.Runtime/tests/System.Globalization.Tests/Invariant/Invariant.Tests.csproj]
error : InstalledDir: /Users/rodo/git/runtime/src/mono/wasi/wasi-sdk/bin [/Users/rodo/git/runtime/src/libraries/System.Runtime/tests/System.Globalization.Tests/Invariant/Invariant.Tests.csproj]
error : clang: error: unsupported option '-fsanitize=address' for target 'wasm32-unknown-wasip2' [took 0,332s] [/Users/rodo/git/runtime/src/libraries/System.Runtime/tests/System.Globalization.Tests/Invariant/Invariant.Tests.csproj]