debug: round 5 — full WER dump + ACP report + filename anomaly scan #6
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: debug-mcpp230 | |
| on: | |
| push: | |
| branches: [ "debug/mcpp230-windows-repro" ] | |
| permissions: | |
| contents: read | |
| env: | |
| MCPP_VERSION: "0.0.95" | |
| jobs: | |
| win-repro: | |
| runs-on: windows-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: report codepages | |
| shell: powershell | |
| run: | | |
| "ACP: $([System.Text.Encoding]::Default.CodePage)" | |
| chcp | |
| Get-ItemProperty "HKLM:\SYSTEM\CurrentControlSet\Control\Nls\CodePage" | Select-Object ACP, OEMCP | Format-List | |
| - name: enable full WER dumps | |
| shell: powershell | |
| run: | | |
| New-Item -Path "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" -Force | Out-Null | |
| Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" DumpType -Value 2 -Type DWord | |
| Set-ItemProperty "HKLM:\SOFTWARE\Microsoft\Windows\Windows Error Reporting\LocalDumps" DumpFolder -Value "D:\dumps" -Type ExpandString | |
| New-Item -ItemType Directory -Force -Path D:\dumps | Out-Null | |
| - name: Download mcpp | |
| shell: bash | |
| run: | | |
| curl -L -fsS -o mcpp.zip \ | |
| "https://github.com/mcpp-community/mcpp/releases/download/v${MCPP_VERSION}/mcpp-${MCPP_VERSION}-windows-x86_64.zip" | |
| powershell -NoProfile -Command "Expand-Archive -Force -Path 'mcpp.zip' -DestinationPath '.'" | |
| root="$PWD/mcpp-${MCPP_VERSION}-windows-x86_64" | |
| mkdir -p "$HOME/.mcpp/registry" | |
| cp -a "$root/registry/." "$HOME/.mcpp/registry/" | |
| echo "MCPP=$(cygpath -m "$root/bin/mcpp.exe")" >> "$GITHUB_ENV" | |
| - name: repro (expect 0xC0000409) | |
| shell: powershell | |
| continue-on-error: true | |
| env: | |
| MCPP_INDEX_MIRROR: GLOBAL | |
| run: | | |
| cd tests\examples\archive | |
| $p = Start-Process -FilePath $env:MCPP -ArgumentList "test" -NoNewWindow -Wait -PassThru ` | |
| -RedirectStandardOutput out.txt -RedirectStandardError err.txt | |
| "RAW EXIT CODE: 0x{0:X8}" -f $p.ExitCode | |
| - name: scan walked trees for anomalous filenames | |
| if: always() | |
| shell: powershell | |
| run: | | |
| $roots = @("tests\examples\archive\.mcpp", "$env:USERPROFILE\.mcpp\registry\data\xpkgs") | |
| foreach ($r in $roots) { | |
| if (!(Test-Path $r)) { "missing: $r"; continue } | |
| "scanning $r" | |
| Get-ChildItem -LiteralPath $r -Recurse -Force -ErrorAction SilentlyContinue | ForEach-Object { | |
| $n = $_.FullName | |
| foreach ($ch in $n.ToCharArray()) { | |
| $c = [int]$ch | |
| if (($c -ge 0xD800 -and $c -le 0xDFFF) -or $c -eq 0xFFFD -or $c -gt 0x2FFF) { | |
| "ANOMALY: U+{0:X4} in: {1}" -f $c, $n | |
| break | |
| } | |
| } | |
| } | |
| } | |
| "scan done" | |
| - name: stage dump into workspace | |
| if: always() | |
| shell: bash | |
| run: | | |
| mkdir -p crashdump | |
| cp /d/dumps/*.dmp crashdump/ 2>/dev/null || true | |
| cp "$LOCALAPPDATA"/CrashDumps/mcpp.exe.*.dmp crashdump/ 2>/dev/null || true | |
| ls -la crashdump/ || true | |
| - name: upload dump artifact | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: mcpp-full-dump | |
| path: crashdump/ | |
| if-no-files-found: warn | |
| compression-level: 9 |