Skip to content

ci: validate Microsoft.Z3.dll PE Machine field is AnyCPU in nightly build validation#9873

Merged
NikolajBjorner merged 2 commits into
masterfrom
copilot/fix-dotnet-wrapper-arm64-issue
Jun 16, 2026
Merged

ci: validate Microsoft.Z3.dll PE Machine field is AnyCPU in nightly build validation#9873
NikolajBjorner merged 2 commits into
masterfrom
copilot/fix-dotnet-wrapper-arm64-issue

Conversation

Copilot AI commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

Microsoft.Z3.dll ships with PE Machine=0x8664 (AMD64), causing the CLR loader to reject it on arm64 .NET hosts (macOS/Linux/Windows ARM) even though the assembly is pure IL (CorFlags.ILONLY=True) and arm64 native libraries are already bundled in the package.

Changes

  • .github/workflows/nightly-validation.yml — adds validate-dotnet-anycpu job to the Nightly Build Validation workflow:
    • Downloads the nightly NuGet package from the GitHub release
    • Extracts lib/netstandard2.0/Microsoft.Z3.dll (NuGet packages are ZIP archives)
    • Reads the COFF Machine field from the PE header using Python struct
    • Fails with an actionable error if Machine is 0x8664 (AMD64) or 0xAA64 (ARM64); passes for 0x014C (i386/AnyCPU) or 0x0000

The check catches any regression where the managed wrapper is compiled architecture-specific, blocking non-x64 .NET hosts from loading it.

Copilot AI changed the title [WIP] Fix .NET wrapper PE Machine field for arm64 support ci: validate Microsoft.Z3.dll PE Machine field is AnyCPU in nightly build validation Jun 15, 2026
Copilot AI requested a review from NikolajBjorner June 15, 2026 18:12
@NikolajBjorner NikolajBjorner marked this pull request as ready for review June 16, 2026 17:16
@NikolajBjorner NikolajBjorner merged commit 66795ea into master Jun 16, 2026
1 check passed
@NikolajBjorner NikolajBjorner deleted the copilot/fix-dotnet-wrapper-arm64-issue branch June 16, 2026 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants