[ci-scan] Build break: CS9377/CS9389 memory-safety errors in monodroid-nativeaot.cs block Android NativeAOT legs
Build Information
Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=1597055&view=results Build error leg or test failing: android-x64 Release NativeAOT / android-arm64 Release NativeAOT - Build product (monodroid-nativeaot.cs)
KBE authoring guidance (ci-failure-scan)Error Detailsis for readers. Paste the full exception, stack trace, or build error excerpt so the failure is understandable without opening the raw log.- Build Analysis parses only the single JSON block under
Error Message. ErrorPatternuses .NETSingleline | IgnoreCase | NonBacktrackingmatching with a 50ms-per-line timeout.- Keep the regex anchored, prefer
[^\n]*over.*, and avoid catastrophic backtracking. - Set
BuildRetrytotrueonly for a clear infrastructure retry case.ExcludeConsoleLogdisables Helix console-log scanning.
Error Details
The Build product step fails for every Android NativeAOT leg (android-x64 Release NativeAOT, android-arm64 Release NativeAOT) in runtime-extra-platforms (definition 154) while compiling src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs under net11.0. The new memory-safety analysis (SYSLIB/CS937x diagnostics) rejects the template's unsafe/extern usage:
src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs(19,38): error CS9377: The 'unsafe' modifier does not have any effect here under the current memory safety rules.
src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs(116,24): error CS9377: The 'unsafe' modifier does not have any effect here under the current memory safety rules.
src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs(168,19): error CS9377: The 'unsafe' modifier does not have any effect here under the current memory safety rules.
src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs(487,24): error CS9377: The 'unsafe' modifier does not have any effect here under the current memory safety rules.
src/tasks/AndroidAppBuilder/Templates/monodroid-nativeaot.cs(50,33): error CS9389: 'extern' member must be marked 'unsafe' or 'safe'.
Build FAILED.The break reproduces across consecutive builds (source build 1597055, finished 2026-09-15, and follow-up build 1598688, finished 2026-09-16), so it is a persistent product break rather than a transient failure. Send to Helix is skipped because the build never produces test binaries.
Error Message
{
"ErrorMessage": "",
"ErrorPattern": "monodroid-nativeaot\\.cs\\([0-9]+,[0-9]+\\): error CS9389: 'extern' member must be marked 'unsafe' or 'safe'(redacted)",
"BuildRetry": false,
"ExcludeConsoleLog": false
}Workflow artifact: ci-failure-scan Artifact kind: kbe-verification Verified match count: 6 hits in failure.log
Filed by ci-failure-scan (detection only). ci-failure-fix walks open [ci-scan] KBEs and either opens a small fix PR or comments here to loop in owners — it never disables the test.
[!NOTE] This issue was generated by the
ci-failure-scanCopilot workflow.
Generated by CI Outer-Loop Failure Scanner · opus48 · 450.2 AIC · ⌖ 21.7 AIC · ⊞ 19.7K · ◷
Report
Summary
| 24-Hour Hit Count | 7-Day Hit Count | 1-Month Count |
|---|---|---|
| 0 | 0 | 0 |
Source: dotnet/runtime