[release/8.0] [wasm] Endian fix for Webcil (#92495)
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Tue, 3 Oct 2023 17:28:26 +0000 (10:28 -0700)
committerGitHub <noreply@github.com>
Tue, 3 Oct 2023 17:28:26 +0000 (10:28 -0700)
commit2e50c1e87261c61d082b36d0ef6145eb1b652adf
tree7e5e4c8c7ea189555d35037c18df3cb5edaa273c
parentbc0f1b0ec650c3a4c81d0b393b4d74a21621c5ce
[release/8.0] [wasm] Endian fix for Webcil (#92495)

* [wasm] Endian fix for Webcil

'dotnet new blazorwasm' command failed on s390x and was throwing a not implemented exception

The issue was with with the WebCil writer and reader, specific endianness conversions relating to the webcil payload were not implemented for big endian machines.

We considered fixing the generic implementation, but there were only two structures in use: WebcilHeader and WebcilSectionHeader, so it was easier to handle them explicitly.

* Fix infinite recursion

* rename var

---------

Co-authored-by: Sanjam Panda <sanjam.panda@ibm.com>
Co-authored-by: Aleksey Kliger (λgeek) <alklig@microsoft.com>
src/tasks/Microsoft.NET.WebAssembly.Webcil/Microsoft.NET.WebAssembly.Webcil.csproj
src/tasks/Microsoft.NET.WebAssembly.Webcil/WebcilConverter.cs
src/tasks/Microsoft.NET.WebAssembly.Webcil/WebcilReader.cs